//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension CodeDeploy {
    // MARK: Enums

    public enum ApplicationRevisionSortBy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case firstUsedTime = "firstUsedTime"
        case lastUsedTime = "lastUsedTime"
        case registerTime = "registerTime"
        public var description: String { return self.rawValue }
    }

    public enum AutoRollbackEvent: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deploymentFailure = "DEPLOYMENT_FAILURE"
        case deploymentStopOnAlarm = "DEPLOYMENT_STOP_ON_ALARM"
        case deploymentStopOnRequest = "DEPLOYMENT_STOP_ON_REQUEST"
        public var description: String { return self.rawValue }
    }

    public enum BundleType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case json = "JSON"
        case tar = "tar"
        case tarGZip = "tgz"
        case yaml = "YAML"
        case zip = "zip"
        public var description: String { return self.rawValue }
    }

    public enum ComputePlatform: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ecs = "ECS"
        case lambda = "Lambda"
        case server = "Server"
        public var description: String { return self.rawValue }
    }

    public enum DeploymentCreator: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case autoscaling = "autoscaling"
        case autoscalingTermination = "autoscalingTermination"
        case cloudFormation = "CloudFormation"
        case cloudFormationRollback = "CloudFormationRollback"
        case codeDeploy = "CodeDeploy"
        case codeDeployAutoUpdate = "CodeDeployAutoUpdate"
        case codeDeployRollback = "codeDeployRollback"
        case user = "user"
        public var description: String { return self.rawValue }
    }

    public enum DeploymentOption: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case withTrafficControl = "WITH_TRAFFIC_CONTROL"
        case withoutTrafficControl = "WITHOUT_TRAFFIC_CONTROL"
        public var description: String { return self.rawValue }
    }

    public enum DeploymentReadyAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case continueDeployment = "CONTINUE_DEPLOYMENT"
        case stopDeployment = "STOP_DEPLOYMENT"
        public var description: String { return self.rawValue }
    }

    public enum DeploymentStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case baking = "Baking"
        case created = "Created"
        case failed = "Failed"
        case inProgress = "InProgress"
        case queued = "Queued"
        case ready = "Ready"
        case stopped = "Stopped"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum DeploymentTargetType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cloudformationTarget = "CloudFormationTarget"
        case ecsTarget = "ECSTarget"
        case instanceTarget = "InstanceTarget"
        case lambdaTarget = "LambdaTarget"
        public var description: String { return self.rawValue }
    }

    public enum DeploymentType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case blueGreen = "BLUE_GREEN"
        case inPlace = "IN_PLACE"
        public var description: String { return self.rawValue }
    }

    public enum DeploymentWaitType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case readyWait = "READY_WAIT"
        case terminationWait = "TERMINATION_WAIT"
        public var description: String { return self.rawValue }
    }

    public enum EC2TagFilterType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case keyAndValue = "KEY_AND_VALUE"
        case keyOnly = "KEY_ONLY"
        case valueOnly = "VALUE_ONLY"
        public var description: String { return self.rawValue }
    }

    public enum ErrorCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case agentIssue = "AGENT_ISSUE"
        case alarmActive = "ALARM_ACTIVE"
        case applicationMissing = "APPLICATION_MISSING"
        case autoScalingConfiguration = "AUTO_SCALING_CONFIGURATION"
        case autoScalingIamRolePermissions = "AUTO_SCALING_IAM_ROLE_PERMISSIONS"
        case autoscalingValidationError = "AUTOSCALING_VALIDATION_ERROR"
        case cloudformationStackFailure = "CLOUDFORMATION_STACK_FAILURE"
        case codedeployResourceCannotBeFound = "CODEDEPLOY_RESOURCE_CANNOT_BE_FOUND"
        case customerApplicationUnhealthy = "CUSTOMER_APPLICATION_UNHEALTHY"
        case deploymentGroupMissing = "DEPLOYMENT_GROUP_MISSING"
        case ecsUpdateError = "ECS_UPDATE_ERROR"
        case elasticLoadBalancingInvalid = "ELASTIC_LOAD_BALANCING_INVALID"
        case elbInvalidInstance = "ELB_INVALID_INSTANCE"
        case healthConstraints = "HEALTH_CONSTRAINTS"
        case healthConstraintsInvalid = "HEALTH_CONSTRAINTS_INVALID"
        case hookExecutionFailure = "HOOK_EXECUTION_FAILURE"
        case iamRoleMissing = "IAM_ROLE_MISSING"
        case iamRolePermissions = "IAM_ROLE_PERMISSIONS"
        case internalError = "INTERNAL_ERROR"
        case invalidEcsService = "INVALID_ECS_SERVICE"
        case invalidLambdaConfiguration = "INVALID_LAMBDA_CONFIGURATION"
        case invalidLambdaFunction = "INVALID_LAMBDA_FUNCTION"
        case invalidRevision = "INVALID_REVISION"
        case manualStop = "MANUAL_STOP"
        case missingBlueGreenDeploymentConfiguration = "MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION"
        case missingElbInformation = "MISSING_ELB_INFORMATION"
        case missingGithubToken = "MISSING_GITHUB_TOKEN"
        case noEc2Subscription = "NO_EC2_SUBSCRIPTION"
        case noInstances = "NO_INSTANCES"
        case overMaxInstances = "OVER_MAX_INSTANCES"
        case resourceLimitExceeded = "RESOURCE_LIMIT_EXCEEDED"
        case revisionMissing = "REVISION_MISSING"
        case throttled = "THROTTLED"
        case timeout = "TIMEOUT"
        public var description: String { return self.rawValue }
    }

    public enum FileExistsBehavior: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disallow = "DISALLOW"
        case overwrite = "OVERWRITE"
        case retain = "RETAIN"
        public var description: String { return self.rawValue }
    }

    public enum GreenFleetProvisioningAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case copyAutoScalingGroup = "COPY_AUTO_SCALING_GROUP"
        case discoverExisting = "DISCOVER_EXISTING"
        public var description: String { return self.rawValue }
    }

    public enum InstanceAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case keepAlive = "KEEP_ALIVE"
        case terminate = "TERMINATE"
        public var description: String { return self.rawValue }
    }

    public enum InstanceStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "Failed"
        case inProgress = "InProgress"
        case pending = "Pending"
        case ready = "Ready"
        case skipped = "Skipped"
        case succeeded = "Succeeded"
        case unknown = "Unknown"
        public var description: String { return self.rawValue }
    }

    public enum InstanceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case blue = "Blue"
        case green = "Green"
        public var description: String { return self.rawValue }
    }

    public enum LifecycleErrorCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case scriptFailed = "ScriptFailed"
        case scriptMissing = "ScriptMissing"
        case scriptNotExecutable = "ScriptNotExecutable"
        case scriptTimedOut = "ScriptTimedOut"
        case success = "Success"
        case unknownError = "UnknownError"
        public var description: String { return self.rawValue }
    }

    public enum LifecycleEventStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "Failed"
        case inProgress = "InProgress"
        case pending = "Pending"
        case skipped = "Skipped"
        case succeeded = "Succeeded"
        case unknown = "Unknown"
        public var description: String { return self.rawValue }
    }

    public enum ListStateFilterAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case exclude = "exclude"
        case ignore = "ignore"
        case include = "include"
        public var description: String { return self.rawValue }
    }

    public enum MinimumHealthyHostsPerZoneType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case fleetPercent = "FLEET_PERCENT"
        case hostCount = "HOST_COUNT"
        public var description: String { return self.rawValue }
    }

    public enum MinimumHealthyHostsType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case fleetPercent = "FLEET_PERCENT"
        case hostCount = "HOST_COUNT"
        public var description: String { return self.rawValue }
    }

    public enum OutdatedInstancesStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ignore = "IGNORE"
        case update = "UPDATE"
        public var description: String { return self.rawValue }
    }

    public enum RegistrationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deregistered = "Deregistered"
        case registered = "Registered"
        public var description: String { return self.rawValue }
    }

    public enum RevisionLocationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case appSpecContent = "AppSpecContent"
        case gitHub = "GitHub"
        case s3 = "S3"
        case string = "String"
        public var description: String { return self.rawValue }
    }

    public enum SortOrder: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ascending = "ascending"
        case descending = "descending"
        public var description: String { return self.rawValue }
    }

    public enum StopStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case pending = "Pending"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum TagFilterType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case keyAndValue = "KEY_AND_VALUE"
        case keyOnly = "KEY_ONLY"
        case valueOnly = "VALUE_ONLY"
        public var description: String { return self.rawValue }
    }

    public enum TargetFilterName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case serverInstanceLabel = "ServerInstanceLabel"
        case targetStatus = "TargetStatus"
        public var description: String { return self.rawValue }
    }

    public enum TargetLabel: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case blue = "Blue"
        case green = "Green"
        public var description: String { return self.rawValue }
    }

    public enum TargetStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "Failed"
        case inProgress = "InProgress"
        case pending = "Pending"
        case ready = "Ready"
        case skipped = "Skipped"
        case succeeded = "Succeeded"
        case unknown = "Unknown"
        public var description: String { return self.rawValue }
    }

    public enum TrafficRoutingType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case allAtOnce = "AllAtOnce"
        case timeBasedCanary = "TimeBasedCanary"
        case timeBasedLinear = "TimeBasedLinear"
        public var description: String { return self.rawValue }
    }

    public enum TriggerEventType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deploymentFailure = "DeploymentFailure"
        case deploymentReady = "DeploymentReady"
        case deploymentRollback = "DeploymentRollback"
        case deploymentStart = "DeploymentStart"
        case deploymentStop = "DeploymentStop"
        case deploymentSuccess = "DeploymentSuccess"
        case instanceFailure = "InstanceFailure"
        case instanceReady = "InstanceReady"
        case instanceStart = "InstanceStart"
        case instanceSuccess = "InstanceSuccess"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddTagsToOnPremisesInstancesInput: AWSEncodableShape {
        /// The names of the on-premises instances to which to add tags.
        public let instanceNames: [String]
        /// The tag key-value pairs to add to the on-premises instances. Keys and values are both required. Keys cannot be null or empty strings. Value-only tags are not allowed.
        public let tags: [Tag]

        @inlinable
        public init(instanceNames: [String], tags: [Tag]) {
            self.instanceNames = instanceNames
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case instanceNames = "instanceNames"
            case tags = "tags"
        }
    }

    public struct Alarm: AWSEncodableShape & AWSDecodableShape {
        /// The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct AlarmConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of alarms configured for the deployment or deployment group. A maximum of 10 alarms can be added.
        public let alarms: [Alarm]?
        /// Indicates whether the alarm configuration is enabled.
        public let enabled: Bool?
        /// Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.    true: The deployment proceeds even if alarm status information can't be retrieved from Amazon CloudWatch.    false: The deployment stops if alarm status information can't be retrieved from Amazon CloudWatch.
        public let ignorePollAlarmFailure: Bool?

        @inlinable
        public init(alarms: [Alarm]? = nil, enabled: Bool? = nil, ignorePollAlarmFailure: Bool? = nil) {
            self.alarms = alarms
            self.enabled = enabled
            self.ignorePollAlarmFailure = ignorePollAlarmFailure
        }

        private enum CodingKeys: String, CodingKey {
            case alarms = "alarms"
            case enabled = "enabled"
            case ignorePollAlarmFailure = "ignorePollAlarmFailure"
        }
    }

    public struct AppSpecContent: AWSEncodableShape & AWSDecodableShape {
        ///  The YAML-formatted or JSON-formatted revision string.  For an Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.  For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.  For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.
        public let content: String?
        ///  The SHA256 hash value of the revision content.
        public let sha256: String?

        @inlinable
        public init(content: String? = nil, sha256: String? = nil) {
            self.content = content
            self.sha256 = sha256
        }

        private enum CodingKeys: String, CodingKey {
            case content = "content"
            case sha256 = "sha256"
        }
    }

    public struct ApplicationInfo: AWSDecodableShape {
        /// The application ID.
        public let applicationId: String?
        /// The application name.
        public let applicationName: String?
        /// The destination platform type for deployment of the application (Lambda or Server).
        public let computePlatform: ComputePlatform?
        /// The time at which the application was created.
        public let createTime: Date?
        /// The name for a connection to a GitHub account.
        public let gitHubAccountName: String?
        /// True if the user has authenticated with GitHub for the specified application. Otherwise, false.
        public let linkedToGitHub: Bool?

        @inlinable
        public init(applicationId: String? = nil, applicationName: String? = nil, computePlatform: ComputePlatform? = nil, createTime: Date? = nil, gitHubAccountName: String? = nil, linkedToGitHub: Bool? = nil) {
            self.applicationId = applicationId
            self.applicationName = applicationName
            self.computePlatform = computePlatform
            self.createTime = createTime
            self.gitHubAccountName = gitHubAccountName
            self.linkedToGitHub = linkedToGitHub
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "applicationId"
            case applicationName = "applicationName"
            case computePlatform = "computePlatform"
            case createTime = "createTime"
            case gitHubAccountName = "gitHubAccountName"
            case linkedToGitHub = "linkedToGitHub"
        }
    }

    public struct AutoRollbackConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether a defined automatic rollback configuration is currently enabled.
        public let enabled: Bool?
        /// The event type or types that trigger a rollback.
        public let events: [AutoRollbackEvent]?

        @inlinable
        public init(enabled: Bool? = nil, events: [AutoRollbackEvent]? = nil) {
            self.enabled = enabled
            self.events = events
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "enabled"
            case events = "events"
        }
    }

    public struct AutoScalingGroup: AWSDecodableShape {
        /// The name of the launch hook that CodeDeploy installed into the Auto Scaling group. For more information about the launch hook, see How Amazon EC2 Auto Scaling works with CodeDeploy in the CodeDeploy User Guide.
        public let hook: String?
        /// The Auto Scaling group name.
        public let name: String?
        /// The name of the termination hook that CodeDeploy installed into the Auto Scaling group. For more information about the termination hook, see Enabling termination deployments during Auto Scaling scale-in events in the CodeDeploy User Guide.
        public let terminationHook: String?

        @inlinable
        public init(hook: String? = nil, name: String? = nil, terminationHook: String? = nil) {
            self.hook = hook
            self.name = name
            self.terminationHook = terminationHook
        }

        private enum CodingKeys: String, CodingKey {
            case hook = "hook"
            case name = "name"
            case terminationHook = "terminationHook"
        }
    }

    public struct BatchGetApplicationRevisionsInput: AWSEncodableShape {
        /// The name of an CodeDeploy application about which to get revision information.
        public let applicationName: String
        /// An array of RevisionLocation objects that specify information to get about the application revisions, including type and location. The maximum number of RevisionLocation objects you can specify is 25.
        public let revisions: [RevisionLocation]

        @inlinable
        public init(applicationName: String, revisions: [RevisionLocation]) {
            self.applicationName = applicationName
            self.revisions = revisions
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case revisions = "revisions"
        }
    }

    public struct BatchGetApplicationRevisionsOutput: AWSDecodableShape {
        /// The name of the application that corresponds to the revisions.
        public let applicationName: String?
        /// Information about errors that might have occurred during the API call.
        public let errorMessage: String?
        /// Additional information about the revisions, including the type and location.
        public let revisions: [RevisionInfo]?

        @inlinable
        public init(applicationName: String? = nil, errorMessage: String? = nil, revisions: [RevisionInfo]? = nil) {
            self.applicationName = applicationName
            self.errorMessage = errorMessage
            self.revisions = revisions
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case errorMessage = "errorMessage"
            case revisions = "revisions"
        }
    }

    public struct BatchGetApplicationsInput: AWSEncodableShape {
        /// A list of application names separated by spaces. The maximum number of application names you can specify is 100.
        public let applicationNames: [String]

        @inlinable
        public init(applicationNames: [String]) {
            self.applicationNames = applicationNames
        }

        public func validate(name: String) throws {
            try self.applicationNames.forEach {
                try validate($0, name: "applicationNames[]", parent: name, max: 100)
                try validate($0, name: "applicationNames[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case applicationNames = "applicationNames"
        }
    }

    public struct BatchGetApplicationsOutput: AWSDecodableShape {
        /// Information about the applications.
        public let applicationsInfo: [ApplicationInfo]?

        @inlinable
        public init(applicationsInfo: [ApplicationInfo]? = nil) {
            self.applicationsInfo = applicationsInfo
        }

        private enum CodingKeys: String, CodingKey {
            case applicationsInfo = "applicationsInfo"
        }
    }

    public struct BatchGetDeploymentGroupsInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the applicable user or Amazon Web Services account.
        public let applicationName: String
        /// The names of the deployment groups.
        public let deploymentGroupNames: [String]

        @inlinable
        public init(applicationName: String, deploymentGroupNames: [String]) {
            self.applicationName = applicationName
            self.deploymentGroupNames = deploymentGroupNames
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.deploymentGroupNames.forEach {
                try validate($0, name: "deploymentGroupNames[]", parent: name, max: 100)
                try validate($0, name: "deploymentGroupNames[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case deploymentGroupNames = "deploymentGroupNames"
        }
    }

    public struct BatchGetDeploymentGroupsOutput: AWSDecodableShape {
        /// Information about the deployment groups.
        public let deploymentGroupsInfo: [DeploymentGroupInfo]?
        /// Information about errors that might have occurred during the API call.
        public let errorMessage: String?

        @inlinable
        public init(deploymentGroupsInfo: [DeploymentGroupInfo]? = nil, errorMessage: String? = nil) {
            self.deploymentGroupsInfo = deploymentGroupsInfo
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentGroupsInfo = "deploymentGroupsInfo"
            case errorMessage = "errorMessage"
        }
    }

    public struct BatchGetDeploymentInstancesInput: AWSEncodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String
        /// The unique IDs of instances used in the deployment. The maximum number of instance IDs you can specify is 25.
        public let instanceIds: [String]

        @inlinable
        public init(deploymentId: String, instanceIds: [String]) {
            self.deploymentId = deploymentId
            self.instanceIds = instanceIds
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case instanceIds = "instanceIds"
        }
    }

    public struct BatchGetDeploymentInstancesOutput: AWSDecodableShape {
        /// Information about errors that might have occurred during the API call.
        public let errorMessage: String?
        /// Information about the instance.
        public let instancesSummary: [InstanceSummary]?

        @inlinable
        public init(errorMessage: String? = nil, instancesSummary: [InstanceSummary]? = nil) {
            self.errorMessage = errorMessage
            self.instancesSummary = instancesSummary
        }

        private enum CodingKeys: String, CodingKey {
            case errorMessage = "errorMessage"
            case instancesSummary = "instancesSummary"
        }
    }

    public struct BatchGetDeploymentTargetsInput: AWSEncodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String
        ///  The unique IDs of the deployment targets. The compute platform of the deployment determines the type of the targets and their formats. The maximum number of deployment target IDs you can specify is 25.   For deployments that use the EC2/On-premises compute platform, the target IDs are Amazon EC2 or on-premises instances IDs, and their target type is instanceTarget.    For deployments that use the Lambda compute platform, the target IDs are the names of Lambda functions, and their target type is instanceTarget.    For deployments that use the Amazon ECS compute platform, the target IDs are pairs of Amazon ECS clusters and services specified using the format :. Their target type is ecsTarget.    For deployments that are deployed with CloudFormation, the target IDs are CloudFormation stack IDs. Their target type is cloudFormationTarget.
        public let targetIds: [String]

        @inlinable
        public init(deploymentId: String, targetIds: [String]) {
            self.deploymentId = deploymentId
            self.targetIds = targetIds
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case targetIds = "targetIds"
        }
    }

    public struct BatchGetDeploymentTargetsOutput: AWSDecodableShape {
        ///  A list of target objects for a deployment. Each target object contains details about the target, such as its status and lifecycle events. The type of the target objects depends on the deployment' compute platform.     EC2/On-premises: Each target object is an Amazon EC2 or on-premises instance.     Lambda: The target object is a specific version of an Lambda function.     Amazon ECS: The target object is an Amazon ECS service.     CloudFormation: The target object is an CloudFormation blue/green deployment.
        public let deploymentTargets: [DeploymentTarget]?

        @inlinable
        public init(deploymentTargets: [DeploymentTarget]? = nil) {
            self.deploymentTargets = deploymentTargets
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentTargets = "deploymentTargets"
        }
    }

    public struct BatchGetDeploymentsInput: AWSEncodableShape {
        ///  A list of deployment IDs, separated by spaces. The maximum number of deployment IDs you can specify is 25.
        public let deploymentIds: [String]

        @inlinable
        public init(deploymentIds: [String]) {
            self.deploymentIds = deploymentIds
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentIds = "deploymentIds"
        }
    }

    public struct BatchGetDeploymentsOutput: AWSDecodableShape {
        ///  Information about the deployments.
        public let deploymentsInfo: [DeploymentInfo]?

        @inlinable
        public init(deploymentsInfo: [DeploymentInfo]? = nil) {
            self.deploymentsInfo = deploymentsInfo
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentsInfo = "deploymentsInfo"
        }
    }

    public struct BatchGetOnPremisesInstancesInput: AWSEncodableShape {
        /// The names of the on-premises instances about which to get information. The maximum number of instance names you can specify is 25.
        public let instanceNames: [String]

        @inlinable
        public init(instanceNames: [String]) {
            self.instanceNames = instanceNames
        }

        private enum CodingKeys: String, CodingKey {
            case instanceNames = "instanceNames"
        }
    }

    public struct BatchGetOnPremisesInstancesOutput: AWSDecodableShape {
        /// Information about the on-premises instances.
        public let instanceInfos: [InstanceInfo]?

        @inlinable
        public init(instanceInfos: [InstanceInfo]? = nil) {
            self.instanceInfos = instanceInfos
        }

        private enum CodingKeys: String, CodingKey {
            case instanceInfos = "instanceInfos"
        }
    }

    public struct BlueGreenDeploymentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
        public let deploymentReadyOption: DeploymentReadyOption?
        /// Information about how instances are provisioned for a replacement environment in a blue/green deployment.
        public let greenFleetProvisioningOption: GreenFleetProvisioningOption?
        /// Information about whether to terminate instances in the original fleet during a blue/green deployment.
        public let terminateBlueInstancesOnDeploymentSuccess: BlueInstanceTerminationOption?

        @inlinable
        public init(deploymentReadyOption: DeploymentReadyOption? = nil, greenFleetProvisioningOption: GreenFleetProvisioningOption? = nil, terminateBlueInstancesOnDeploymentSuccess: BlueInstanceTerminationOption? = nil) {
            self.deploymentReadyOption = deploymentReadyOption
            self.greenFleetProvisioningOption = greenFleetProvisioningOption
            self.terminateBlueInstancesOnDeploymentSuccess = terminateBlueInstancesOnDeploymentSuccess
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentReadyOption = "deploymentReadyOption"
            case greenFleetProvisioningOption = "greenFleetProvisioningOption"
            case terminateBlueInstancesOnDeploymentSuccess = "terminateBlueInstancesOnDeploymentSuccess"
        }
    }

    public struct BlueInstanceTerminationOption: AWSEncodableShape & AWSDecodableShape {
        /// The action to take on instances in the original environment after a successful blue/green deployment.    TERMINATE: Instances are terminated after a specified wait time.    KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.
        public let action: InstanceAction?
        /// For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. For an Amazon ECS deployment, the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set.  The maximum setting is 2880 minutes (2 days).
        public let terminationWaitTimeInMinutes: Int?

        @inlinable
        public init(action: InstanceAction? = nil, terminationWaitTimeInMinutes: Int? = nil) {
            self.action = action
            self.terminationWaitTimeInMinutes = terminationWaitTimeInMinutes
        }

        private enum CodingKeys: String, CodingKey {
            case action = "action"
            case terminationWaitTimeInMinutes = "terminationWaitTimeInMinutes"
        }
    }

    public struct CloudFormationTarget: AWSDecodableShape {
        /// The unique ID of an CloudFormation blue/green deployment.
        public let deploymentId: String?
        ///  The date and time when the target application was updated by an CloudFormation blue/green deployment.
        public let lastUpdatedAt: Date?
        ///  The lifecycle events of the CloudFormation blue/green deployment to this target application.
        public let lifecycleEvents: [LifecycleEvent]?
        /// The resource type for the CloudFormation blue/green deployment.
        public let resourceType: String?
        ///  The status of an CloudFormation blue/green deployment's target application.
        public let status: TargetStatus?
        ///  The unique ID of a deployment target that has a type of CloudFormationTarget.
        public let targetId: String?
        /// The percentage of production traffic that the target version of an CloudFormation blue/green deployment receives.
        public let targetVersionWeight: Double?

        @inlinable
        public init(deploymentId: String? = nil, lastUpdatedAt: Date? = nil, lifecycleEvents: [LifecycleEvent]? = nil, resourceType: String? = nil, status: TargetStatus? = nil, targetId: String? = nil, targetVersionWeight: Double? = nil) {
            self.deploymentId = deploymentId
            self.lastUpdatedAt = lastUpdatedAt
            self.lifecycleEvents = lifecycleEvents
            self.resourceType = resourceType
            self.status = status
            self.targetId = targetId
            self.targetVersionWeight = targetVersionWeight
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case lastUpdatedAt = "lastUpdatedAt"
            case lifecycleEvents = "lifecycleEvents"
            case resourceType = "resourceType"
            case status = "status"
            case targetId = "targetId"
            case targetVersionWeight = "targetVersionWeight"
        }
    }

    public struct ContinueDeploymentInput: AWSEncodableShape {
        ///  The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment.
        public let deploymentId: String?
        ///  The status of the deployment's waiting period. READY_WAIT indicates that the deployment is ready to start shifting traffic. TERMINATION_WAIT indicates that the traffic is shifted, but the original target is not terminated.
        public let deploymentWaitType: DeploymentWaitType?

        @inlinable
        public init(deploymentId: String? = nil, deploymentWaitType: DeploymentWaitType? = nil) {
            self.deploymentId = deploymentId
            self.deploymentWaitType = deploymentWaitType
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case deploymentWaitType = "deploymentWaitType"
        }
    }

    public struct CreateApplicationInput: AWSEncodableShape {
        /// The name of the application. This name must be unique with the applicable user or Amazon Web Services account.
        public let applicationName: String
        ///  The destination platform type for the deployment (Lambda, Server, or ECS).
        public let computePlatform: ComputePlatform?
        ///  The metadata that you apply to CodeDeploy applications to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.
        public let tags: [Tag]?

        @inlinable
        public init(applicationName: String, computePlatform: ComputePlatform? = nil, tags: [Tag]? = nil) {
            self.applicationName = applicationName
            self.computePlatform = computePlatform
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case computePlatform = "computePlatform"
            case tags = "tags"
        }
    }

    public struct CreateApplicationOutput: AWSDecodableShape {
        /// A unique application ID.
        public let applicationId: String?

        @inlinable
        public init(applicationId: String? = nil) {
            self.applicationId = applicationId
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "applicationId"
        }
    }

    public struct CreateDeploymentConfigInput: AWSEncodableShape {
        /// The destination platform type for the deployment (Lambda, Server, or ECS).
        public let computePlatform: ComputePlatform?
        /// The name of the deployment configuration to create.
        public let deploymentConfigName: String
        /// The minimum number of healthy instances that should be available at any time during the deployment. There are two parameters expected in the input: type and value. The type parameter takes either of the following values:   HOST_COUNT: The value parameter represents the minimum number of healthy instances as an absolute value.   FLEET_PERCENT: The value parameter represents the minimum number of healthy instances as a percentage of the total number of instances in the deployment. If you specify FLEET_PERCENT, at the start of the deployment, CodeDeploy converts the percentage to the equivalent number of instances and rounds up fractional instances.   The value parameter takes an integer. For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 95.
        public let minimumHealthyHosts: MinimumHealthyHosts?
        /// The configuration that specifies how the deployment traffic is routed.
        public let trafficRoutingConfig: TrafficRoutingConfig?
        /// Configure the ZonalConfig object if you want CodeDeploy to deploy your application to one Availability Zone at a time, within an Amazon Web Services Region. For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.
        public let zonalConfig: ZonalConfig?

        @inlinable
        public init(computePlatform: ComputePlatform? = nil, deploymentConfigName: String, minimumHealthyHosts: MinimumHealthyHosts? = nil, trafficRoutingConfig: TrafficRoutingConfig? = nil, zonalConfig: ZonalConfig? = nil) {
            self.computePlatform = computePlatform
            self.deploymentConfigName = deploymentConfigName
            self.minimumHealthyHosts = minimumHealthyHosts
            self.trafficRoutingConfig = trafficRoutingConfig
            self.zonalConfig = zonalConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, max: 100)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case computePlatform = "computePlatform"
            case deploymentConfigName = "deploymentConfigName"
            case minimumHealthyHosts = "minimumHealthyHosts"
            case trafficRoutingConfig = "trafficRoutingConfig"
            case zonalConfig = "zonalConfig"
        }
    }

    public struct CreateDeploymentConfigOutput: AWSDecodableShape {
        /// A unique deployment configuration ID.
        public let deploymentConfigId: String?

        @inlinable
        public init(deploymentConfigId: String? = nil) {
            self.deploymentConfigId = deploymentConfigId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentConfigId = "deploymentConfigId"
        }
    }

    public struct CreateDeploymentGroupInput: AWSEncodableShape {
        /// Information to add about Amazon CloudWatch alarms when the deployment group is created.
        public let alarmConfiguration: AlarmConfiguration?
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String
        /// Configuration information for an automatic rollback that is added when a deployment group is created.
        public let autoRollbackConfiguration: AutoRollbackConfiguration?
        /// A list of associated Amazon EC2 Auto Scaling groups.
        public let autoScalingGroups: [String]?
        /// Information about blue/green deployment options for a deployment group.
        public let blueGreenDeploymentConfiguration: BlueGreenDeploymentConfiguration?
        /// If specified, the deployment configuration name can be either one of the predefined configurations provided with CodeDeploy or a custom deployment configuration that you create by calling the create deployment configuration operation.  CodeDeployDefault.OneAtATime is the default deployment configuration. It is used if a configuration isn't specified for the deployment or deployment group. For more information about the predefined deployment configurations in CodeDeploy, see Working with Deployment Configurations in CodeDeploy in the CodeDeploy User Guide.
        public let deploymentConfigName: String?
        /// The name of a new deployment group for the specified application.
        public let deploymentGroupName: String
        /// Information about the type of deployment, in-place or blue/green, that you want to run and whether to route deployment traffic behind a load balancer.
        public let deploymentStyle: DeploymentStyle?
        /// The Amazon EC2 tags on which to filter. The deployment group includes Amazon EC2 instances with any of the specified tags. Cannot be used in the same call as ec2TagSet.
        public let ec2TagFilters: [EC2TagFilter]?
        /// Information about groups of tags applied to Amazon EC2 instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilters.
        public let ec2TagSet: EC2TagSet?
        ///  The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format :.
        public let ecsServices: [ECSService]?
        /// Information about the load balancer used in a deployment.
        public let loadBalancerInfo: LoadBalancerInfo?
        /// The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags. Cannot be used in the same call as OnPremisesTagSet.
        public let onPremisesInstanceTagFilters: [TagFilter]?
        /// Information about groups of tags applied to on-premises instances. The deployment group includes only on-premises instances identified by all of the tag groups. Cannot be used in the same call as onPremisesInstanceTagFilters.
        public let onPremisesTagSet: OnPremisesTagSet?
        /// Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. If this option is set to UPDATE or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances. If this option is set to IGNORE, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.
        public let outdatedInstancesStrategy: OutdatedInstancesStrategy?
        /// A service role Amazon Resource Name (ARN) that allows CodeDeploy to act on the user's behalf when interacting with Amazon Web Services services.
        public let serviceRoleArn: String
        ///  The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.
        public let tags: [Tag]?
        /// This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see Integrating CodeDeploy with Amazon EC2 Auto Scaling in the CodeDeploy User Guide. Set terminationHookEnabled to true to have CodeDeploy install a termination hook into your Auto Scaling group when you create a deployment group. When this hook is installed, CodeDeploy will perform termination deployments. For information about termination deployments, see Enabling termination deployments during Auto Scaling scale-in events in the CodeDeploy User Guide. For more information about Auto Scaling scale-in events, see the Scale in topic in the Amazon EC2 Auto Scaling User Guide.
        public let terminationHookEnabled: Bool?
        /// Information about triggers to create when the deployment group is created. For examples, see Create a Trigger for an CodeDeploy Event in the CodeDeploy User Guide.
        public let triggerConfigurations: [TriggerConfig]?

        @inlinable
        public init(alarmConfiguration: AlarmConfiguration? = nil, applicationName: String, autoRollbackConfiguration: AutoRollbackConfiguration? = nil, autoScalingGroups: [String]? = nil, blueGreenDeploymentConfiguration: BlueGreenDeploymentConfiguration? = nil, deploymentConfigName: String? = nil, deploymentGroupName: String, deploymentStyle: DeploymentStyle? = nil, ec2TagFilters: [EC2TagFilter]? = nil, ec2TagSet: EC2TagSet? = nil, ecsServices: [ECSService]? = nil, loadBalancerInfo: LoadBalancerInfo? = nil, onPremisesInstanceTagFilters: [TagFilter]? = nil, onPremisesTagSet: OnPremisesTagSet? = nil, outdatedInstancesStrategy: OutdatedInstancesStrategy? = nil, serviceRoleArn: String, tags: [Tag]? = nil, terminationHookEnabled: Bool? = nil, triggerConfigurations: [TriggerConfig]? = nil) {
            self.alarmConfiguration = alarmConfiguration
            self.applicationName = applicationName
            self.autoRollbackConfiguration = autoRollbackConfiguration
            self.autoScalingGroups = autoScalingGroups
            self.blueGreenDeploymentConfiguration = blueGreenDeploymentConfiguration
            self.deploymentConfigName = deploymentConfigName
            self.deploymentGroupName = deploymentGroupName
            self.deploymentStyle = deploymentStyle
            self.ec2TagFilters = ec2TagFilters
            self.ec2TagSet = ec2TagSet
            self.ecsServices = ecsServices
            self.loadBalancerInfo = loadBalancerInfo
            self.onPremisesInstanceTagFilters = onPremisesInstanceTagFilters
            self.onPremisesTagSet = onPremisesTagSet
            self.outdatedInstancesStrategy = outdatedInstancesStrategy
            self.serviceRoleArn = serviceRoleArn
            self.tags = tags
            self.terminationHookEnabled = terminationHookEnabled
            self.triggerConfigurations = triggerConfigurations
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, max: 100)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, min: 1)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, max: 100)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case alarmConfiguration = "alarmConfiguration"
            case applicationName = "applicationName"
            case autoRollbackConfiguration = "autoRollbackConfiguration"
            case autoScalingGroups = "autoScalingGroups"
            case blueGreenDeploymentConfiguration = "blueGreenDeploymentConfiguration"
            case deploymentConfigName = "deploymentConfigName"
            case deploymentGroupName = "deploymentGroupName"
            case deploymentStyle = "deploymentStyle"
            case ec2TagFilters = "ec2TagFilters"
            case ec2TagSet = "ec2TagSet"
            case ecsServices = "ecsServices"
            case loadBalancerInfo = "loadBalancerInfo"
            case onPremisesInstanceTagFilters = "onPremisesInstanceTagFilters"
            case onPremisesTagSet = "onPremisesTagSet"
            case outdatedInstancesStrategy = "outdatedInstancesStrategy"
            case serviceRoleArn = "serviceRoleArn"
            case tags = "tags"
            case terminationHookEnabled = "terminationHookEnabled"
            case triggerConfigurations = "triggerConfigurations"
        }
    }

    public struct CreateDeploymentGroupOutput: AWSDecodableShape {
        /// A unique deployment group ID.
        public let deploymentGroupId: String?

        @inlinable
        public init(deploymentGroupId: String? = nil) {
            self.deploymentGroupId = deploymentGroupId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentGroupId = "deploymentGroupId"
        }
    }

    public struct CreateDeploymentInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String
        /// Configuration information for an automatic rollback that is added when a deployment is created.
        public let autoRollbackConfiguration: AutoRollbackConfiguration?
        /// The name of a deployment configuration associated with the user or Amazon Web Services account. If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, CodeDeployDefault.OneAtATime is used by default.
        public let deploymentConfigName: String?
        /// The name of the deployment group.
        public let deploymentGroupName: String?
        /// A comment about the deployment.
        public let description: String?
        /// Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment. The fileExistsBehavior parameter takes any of the following values:   DISALLOW: The deployment fails. This is also the default behavior if no option is specified.   OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.   RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.
        public let fileExistsBehavior: FileExistsBehavior?
        ///  If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop.  If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.  During a deployment, the CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.  If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored.
        public let ignoreApplicationStopFailures: Bool?
        /// Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call CreateDeployment to create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.  If you specify an overrideAlarmConfiguration, you need the UpdateDeploymentGroup IAM permission when calling CreateDeployment.
        public let overrideAlarmConfiguration: AlarmConfiguration?
        ///  The type and location of the revision to deploy.
        public let revision: RevisionLocation?
        ///  Information about the instances that belong to the replacement environment in a blue/green deployment.
        public let targetInstances: TargetInstances?
        ///  Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.
        public let updateOutdatedInstancesOnly: Bool?

        @inlinable
        public init(applicationName: String, autoRollbackConfiguration: AutoRollbackConfiguration? = nil, deploymentConfigName: String? = nil, deploymentGroupName: String? = nil, description: String? = nil, fileExistsBehavior: FileExistsBehavior? = nil, ignoreApplicationStopFailures: Bool? = nil, overrideAlarmConfiguration: AlarmConfiguration? = nil, revision: RevisionLocation? = nil, targetInstances: TargetInstances? = nil, updateOutdatedInstancesOnly: Bool? = nil) {
            self.applicationName = applicationName
            self.autoRollbackConfiguration = autoRollbackConfiguration
            self.deploymentConfigName = deploymentConfigName
            self.deploymentGroupName = deploymentGroupName
            self.description = description
            self.fileExistsBehavior = fileExistsBehavior
            self.ignoreApplicationStopFailures = ignoreApplicationStopFailures
            self.overrideAlarmConfiguration = overrideAlarmConfiguration
            self.revision = revision
            self.targetInstances = targetInstances
            self.updateOutdatedInstancesOnly = updateOutdatedInstancesOnly
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, max: 100)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, min: 1)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, max: 100)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case autoRollbackConfiguration = "autoRollbackConfiguration"
            case deploymentConfigName = "deploymentConfigName"
            case deploymentGroupName = "deploymentGroupName"
            case description = "description"
            case fileExistsBehavior = "fileExistsBehavior"
            case ignoreApplicationStopFailures = "ignoreApplicationStopFailures"
            case overrideAlarmConfiguration = "overrideAlarmConfiguration"
            case revision = "revision"
            case targetInstances = "targetInstances"
            case updateOutdatedInstancesOnly = "updateOutdatedInstancesOnly"
        }
    }

    public struct CreateDeploymentOutput: AWSDecodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String?

        @inlinable
        public init(deploymentId: String? = nil) {
            self.deploymentId = deploymentId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
        }
    }

    public struct DeleteApplicationInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String

        @inlinable
        public init(applicationName: String) {
            self.applicationName = applicationName
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
        }
    }

    public struct DeleteDeploymentConfigInput: AWSEncodableShape {
        /// The name of a deployment configuration associated with the user or Amazon Web Services account.
        public let deploymentConfigName: String

        @inlinable
        public init(deploymentConfigName: String) {
            self.deploymentConfigName = deploymentConfigName
        }

        public func validate(name: String) throws {
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, max: 100)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentConfigName = "deploymentConfigName"
        }
    }

    public struct DeleteDeploymentGroupInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String
        /// The name of a deployment group for the specified application.
        public let deploymentGroupName: String

        @inlinable
        public init(applicationName: String, deploymentGroupName: String) {
            self.applicationName = applicationName
            self.deploymentGroupName = deploymentGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, max: 100)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case deploymentGroupName = "deploymentGroupName"
        }
    }

    public struct DeleteDeploymentGroupOutput: AWSDecodableShape {
        /// If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group. If the output contains data, CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group.
        public let hooksNotCleanedUp: [AutoScalingGroup]?

        @inlinable
        public init(hooksNotCleanedUp: [AutoScalingGroup]? = nil) {
            self.hooksNotCleanedUp = hooksNotCleanedUp
        }

        private enum CodingKeys: String, CodingKey {
            case hooksNotCleanedUp = "hooksNotCleanedUp"
        }
    }

    public struct DeleteGitHubAccountTokenInput: AWSEncodableShape {
        /// The name of the GitHub account connection to delete.
        public let tokenName: String?

        @inlinable
        public init(tokenName: String? = nil) {
            self.tokenName = tokenName
        }

        private enum CodingKeys: String, CodingKey {
            case tokenName = "tokenName"
        }
    }

    public struct DeleteGitHubAccountTokenOutput: AWSDecodableShape {
        /// The name of the GitHub account connection that was deleted.
        public let tokenName: String?

        @inlinable
        public init(tokenName: String? = nil) {
            self.tokenName = tokenName
        }

        private enum CodingKeys: String, CodingKey {
            case tokenName = "tokenName"
        }
    }

    public struct DeleteResourcesByExternalIdInput: AWSEncodableShape {
        /// The unique ID of an external resource (for example, a CloudFormation stack ID) that is linked to one or more CodeDeploy resources.
        public let externalId: String?

        @inlinable
        public init(externalId: String? = nil) {
            self.externalId = externalId
        }

        private enum CodingKeys: String, CodingKey {
            case externalId = "externalId"
        }
    }

    public struct DeleteResourcesByExternalIdOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeploymentConfigInfo: AWSDecodableShape {
        /// The destination platform type for the deployment (Lambda, Server, or ECS).
        public let computePlatform: ComputePlatform?
        /// The time at which the deployment configuration was created.
        public let createTime: Date?
        /// The deployment configuration ID.
        public let deploymentConfigId: String?
        /// The deployment configuration name.
        public let deploymentConfigName: String?
        /// Information about the number or percentage of minimum healthy instances.
        public let minimumHealthyHosts: MinimumHealthyHosts?
        /// The configuration that specifies how the deployment traffic is routed. Used for deployments with a Lambda or Amazon ECS compute platform only.
        public let trafficRoutingConfig: TrafficRoutingConfig?
        /// Information about a zonal configuration.
        public let zonalConfig: ZonalConfig?

        @inlinable
        public init(computePlatform: ComputePlatform? = nil, createTime: Date? = nil, deploymentConfigId: String? = nil, deploymentConfigName: String? = nil, minimumHealthyHosts: MinimumHealthyHosts? = nil, trafficRoutingConfig: TrafficRoutingConfig? = nil, zonalConfig: ZonalConfig? = nil) {
            self.computePlatform = computePlatform
            self.createTime = createTime
            self.deploymentConfigId = deploymentConfigId
            self.deploymentConfigName = deploymentConfigName
            self.minimumHealthyHosts = minimumHealthyHosts
            self.trafficRoutingConfig = trafficRoutingConfig
            self.zonalConfig = zonalConfig
        }

        private enum CodingKeys: String, CodingKey {
            case computePlatform = "computePlatform"
            case createTime = "createTime"
            case deploymentConfigId = "deploymentConfigId"
            case deploymentConfigName = "deploymentConfigName"
            case minimumHealthyHosts = "minimumHealthyHosts"
            case trafficRoutingConfig = "trafficRoutingConfig"
            case zonalConfig = "zonalConfig"
        }
    }

    public struct DeploymentGroupInfo: AWSDecodableShape {
        /// A list of alarms associated with the deployment group.
        public let alarmConfiguration: AlarmConfiguration?
        /// The application name.
        public let applicationName: String?
        /// Information about the automatic rollback configuration associated with the deployment group.
        public let autoRollbackConfiguration: AutoRollbackConfiguration?
        /// A list of associated Auto Scaling groups.
        public let autoScalingGroups: [AutoScalingGroup]?
        /// Information about blue/green deployment options for a deployment group.
        public let blueGreenDeploymentConfiguration: BlueGreenDeploymentConfiguration?
        /// The destination platform type for the deployment (Lambda, Server, or ECS).
        public let computePlatform: ComputePlatform?
        /// The deployment configuration name.
        public let deploymentConfigName: String?
        /// The deployment group ID.
        public let deploymentGroupId: String?
        /// The deployment group name.
        public let deploymentGroupName: String?
        /// Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.
        public let deploymentStyle: DeploymentStyle?
        /// The Amazon EC2 tags on which to filter. The deployment group includes EC2 instances with any of the specified tags.
        public let ec2TagFilters: [EC2TagFilter]?
        /// Information about groups of tags applied to an Amazon EC2 instance. The deployment group includes only Amazon EC2 instances identified by all of the tag groups. Cannot be used in the same call as ec2TagFilters.
        public let ec2TagSet: EC2TagSet?
        ///  The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format :.
        public let ecsServices: [ECSService]?
        /// Information about the most recent attempted deployment to the deployment group.
        public let lastAttemptedDeployment: LastDeploymentInfo?
        /// Information about the most recent successful deployment to the deployment group.
        public let lastSuccessfulDeployment: LastDeploymentInfo?
        /// Information about the load balancer to use in a deployment.
        public let loadBalancerInfo: LoadBalancerInfo?
        /// The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags.
        public let onPremisesInstanceTagFilters: [TagFilter]?
        /// Information about groups of tags applied to an on-premises instance. The deployment group includes only on-premises instances identified by all the tag groups. Cannot be used in the same call as onPremisesInstanceTagFilters.
        public let onPremisesTagSet: OnPremisesTagSet?
        /// Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. If this option is set to UPDATE or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances. If this option is set to IGNORE, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.
        public let outdatedInstancesStrategy: OutdatedInstancesStrategy?
        /// A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to Amazon Web Services services on your behalf. For more information, see Create a Service Role for CodeDeploy in the CodeDeploy User Guide.
        public let serviceRoleArn: String?
        /// Information about the deployment group's target revision, including type and location.
        public let targetRevision: RevisionLocation?
        /// Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group. For more information about the termination hook, see How Amazon EC2 Auto Scaling works with CodeDeploy in the CodeDeploy User Guide.
        public let terminationHookEnabled: Bool?
        /// Information about triggers associated with the deployment group.
        public let triggerConfigurations: [TriggerConfig]?

        @inlinable
        public init(alarmConfiguration: AlarmConfiguration? = nil, applicationName: String? = nil, autoRollbackConfiguration: AutoRollbackConfiguration? = nil, autoScalingGroups: [AutoScalingGroup]? = nil, blueGreenDeploymentConfiguration: BlueGreenDeploymentConfiguration? = nil, computePlatform: ComputePlatform? = nil, deploymentConfigName: String? = nil, deploymentGroupId: String? = nil, deploymentGroupName: String? = nil, deploymentStyle: DeploymentStyle? = nil, ec2TagFilters: [EC2TagFilter]? = nil, ec2TagSet: EC2TagSet? = nil, ecsServices: [ECSService]? = nil, lastAttemptedDeployment: LastDeploymentInfo? = nil, lastSuccessfulDeployment: LastDeploymentInfo? = nil, loadBalancerInfo: LoadBalancerInfo? = nil, onPremisesInstanceTagFilters: [TagFilter]? = nil, onPremisesTagSet: OnPremisesTagSet? = nil, outdatedInstancesStrategy: OutdatedInstancesStrategy? = nil, serviceRoleArn: String? = nil, targetRevision: RevisionLocation? = nil, terminationHookEnabled: Bool? = nil, triggerConfigurations: [TriggerConfig]? = nil) {
            self.alarmConfiguration = alarmConfiguration
            self.applicationName = applicationName
            self.autoRollbackConfiguration = autoRollbackConfiguration
            self.autoScalingGroups = autoScalingGroups
            self.blueGreenDeploymentConfiguration = blueGreenDeploymentConfiguration
            self.computePlatform = computePlatform
            self.deploymentConfigName = deploymentConfigName
            self.deploymentGroupId = deploymentGroupId
            self.deploymentGroupName = deploymentGroupName
            self.deploymentStyle = deploymentStyle
            self.ec2TagFilters = ec2TagFilters
            self.ec2TagSet = ec2TagSet
            self.ecsServices = ecsServices
            self.lastAttemptedDeployment = lastAttemptedDeployment
            self.lastSuccessfulDeployment = lastSuccessfulDeployment
            self.loadBalancerInfo = loadBalancerInfo
            self.onPremisesInstanceTagFilters = onPremisesInstanceTagFilters
            self.onPremisesTagSet = onPremisesTagSet
            self.outdatedInstancesStrategy = outdatedInstancesStrategy
            self.serviceRoleArn = serviceRoleArn
            self.targetRevision = targetRevision
            self.terminationHookEnabled = terminationHookEnabled
            self.triggerConfigurations = triggerConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case alarmConfiguration = "alarmConfiguration"
            case applicationName = "applicationName"
            case autoRollbackConfiguration = "autoRollbackConfiguration"
            case autoScalingGroups = "autoScalingGroups"
            case blueGreenDeploymentConfiguration = "blueGreenDeploymentConfiguration"
            case computePlatform = "computePlatform"
            case deploymentConfigName = "deploymentConfigName"
            case deploymentGroupId = "deploymentGroupId"
            case deploymentGroupName = "deploymentGroupName"
            case deploymentStyle = "deploymentStyle"
            case ec2TagFilters = "ec2TagFilters"
            case ec2TagSet = "ec2TagSet"
            case ecsServices = "ecsServices"
            case lastAttemptedDeployment = "lastAttemptedDeployment"
            case lastSuccessfulDeployment = "lastSuccessfulDeployment"
            case loadBalancerInfo = "loadBalancerInfo"
            case onPremisesInstanceTagFilters = "onPremisesInstanceTagFilters"
            case onPremisesTagSet = "onPremisesTagSet"
            case outdatedInstancesStrategy = "outdatedInstancesStrategy"
            case serviceRoleArn = "serviceRoleArn"
            case targetRevision = "targetRevision"
            case terminationHookEnabled = "terminationHookEnabled"
            case triggerConfigurations = "triggerConfigurations"
        }
    }

    public struct DeploymentInfo: AWSDecodableShape {
        /// Provides information about the results of a deployment, such as whether instances in the original environment in a blue/green deployment were not terminated.
        public let additionalDeploymentStatusInfo: String?
        /// The application name.
        public let applicationName: String?
        /// Information about the automatic rollback configuration associated with the deployment.
        public let autoRollbackConfiguration: AutoRollbackConfiguration?
        /// Information about blue/green deployment options for this deployment.
        public let blueGreenDeploymentConfiguration: BlueGreenDeploymentConfiguration?
        /// A timestamp that indicates when the deployment was complete.
        public let completeTime: Date?
        /// The destination platform type for the deployment (Lambda, Server, or ECS).
        public let computePlatform: ComputePlatform?
        /// A timestamp that indicates when the deployment was created.
        public let createTime: Date?
        /// The means by which the deployment was created:    user: A user created the deployment.    autoscaling: Amazon EC2 Auto Scaling created the deployment.    codeDeployRollback: A rollback process created the deployment.    CodeDeployAutoUpdate: An auto-update process created the deployment when it detected outdated Amazon EC2 instances.
        public let creator: DeploymentCreator?
        ///  The deployment configuration name.
        public let deploymentConfigName: String?
        ///  The deployment group name.
        public let deploymentGroupName: String?
        ///  The unique ID of a deployment.
        public let deploymentId: String?
        /// A summary of the deployment status of the instances in the deployment.
        public let deploymentOverview: DeploymentOverview?
        /// Messages that contain information about the status of a deployment.
        public let deploymentStatusMessages: [String]?
        /// Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.
        public let deploymentStyle: DeploymentStyle?
        /// A comment about the deployment.
        public let description: String?
        /// Information about any error associated with this deployment.
        public let errorInformation: ErrorInformation?
        /// The unique ID for an external resource (for example, a CloudFormation stack ID) that is linked to this deployment.
        public let externalId: String?
        /// Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.    DISALLOW: The deployment fails. This is also the default behavior if no option is specified.    OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.    RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.
        public let fileExistsBehavior: FileExistsBehavior?
        ///  If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop.  If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.  During a deployment, the CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.  If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored.
        public let ignoreApplicationStopFailures: Bool?
        /// Indicates whether the wait period set for the termination of instances in the original environment has started. Status is 'false' if the KEEP_ALIVE option is specified. Otherwise, 'true' as soon as the termination wait period starts.
        public let instanceTerminationWaitTimeStarted: Bool?
        /// Information about the load balancer used in the deployment.
        public let loadBalancerInfo: LoadBalancerInfo?
        public let overrideAlarmConfiguration: AlarmConfiguration?
        /// Information about the application revision that was deployed to the deployment group before the most recent successful deployment.
        public let previousRevision: RevisionLocation?
        public let relatedDeployments: RelatedDeployments?
        /// Information about the location of stored application artifacts and the service from which to retrieve them.
        public let revision: RevisionLocation?
        /// Information about a deployment rollback.
        public let rollbackInfo: RollbackInfo?
        /// A timestamp that indicates when the deployment was deployed to the deployment group. In some cases, the reported value of the start time might be later than the complete time. This is due to differences in the clock settings of backend servers that participate in the deployment process.
        public let startTime: Date?
        /// The current state of the deployment as a whole.
        public let status: DeploymentStatus?
        /// Information about the instances that belong to the replacement environment in a blue/green deployment.
        public let targetInstances: TargetInstances?
        /// Indicates whether only instances that are not running the latest application revision are to be deployed to.
        public let updateOutdatedInstancesOnly: Bool?

        @inlinable
        public init(additionalDeploymentStatusInfo: String? = nil, applicationName: String? = nil, autoRollbackConfiguration: AutoRollbackConfiguration? = nil, blueGreenDeploymentConfiguration: BlueGreenDeploymentConfiguration? = nil, completeTime: Date? = nil, computePlatform: ComputePlatform? = nil, createTime: Date? = nil, creator: DeploymentCreator? = nil, deploymentConfigName: String? = nil, deploymentGroupName: String? = nil, deploymentId: String? = nil, deploymentOverview: DeploymentOverview? = nil, deploymentStatusMessages: [String]? = nil, deploymentStyle: DeploymentStyle? = nil, description: String? = nil, errorInformation: ErrorInformation? = nil, externalId: String? = nil, fileExistsBehavior: FileExistsBehavior? = nil, ignoreApplicationStopFailures: Bool? = nil, instanceTerminationWaitTimeStarted: Bool? = nil, loadBalancerInfo: LoadBalancerInfo? = nil, overrideAlarmConfiguration: AlarmConfiguration? = nil, previousRevision: RevisionLocation? = nil, relatedDeployments: RelatedDeployments? = nil, revision: RevisionLocation? = nil, rollbackInfo: RollbackInfo? = nil, startTime: Date? = nil, status: DeploymentStatus? = nil, targetInstances: TargetInstances? = nil, updateOutdatedInstancesOnly: Bool? = nil) {
            self.additionalDeploymentStatusInfo = additionalDeploymentStatusInfo
            self.applicationName = applicationName
            self.autoRollbackConfiguration = autoRollbackConfiguration
            self.blueGreenDeploymentConfiguration = blueGreenDeploymentConfiguration
            self.completeTime = completeTime
            self.computePlatform = computePlatform
            self.createTime = createTime
            self.creator = creator
            self.deploymentConfigName = deploymentConfigName
            self.deploymentGroupName = deploymentGroupName
            self.deploymentId = deploymentId
            self.deploymentOverview = deploymentOverview
            self.deploymentStatusMessages = deploymentStatusMessages
            self.deploymentStyle = deploymentStyle
            self.description = description
            self.errorInformation = errorInformation
            self.externalId = externalId
            self.fileExistsBehavior = fileExistsBehavior
            self.ignoreApplicationStopFailures = ignoreApplicationStopFailures
            self.instanceTerminationWaitTimeStarted = instanceTerminationWaitTimeStarted
            self.loadBalancerInfo = loadBalancerInfo
            self.overrideAlarmConfiguration = overrideAlarmConfiguration
            self.previousRevision = previousRevision
            self.relatedDeployments = relatedDeployments
            self.revision = revision
            self.rollbackInfo = rollbackInfo
            self.startTime = startTime
            self.status = status
            self.targetInstances = targetInstances
            self.updateOutdatedInstancesOnly = updateOutdatedInstancesOnly
        }

        private enum CodingKeys: String, CodingKey {
            case additionalDeploymentStatusInfo = "additionalDeploymentStatusInfo"
            case applicationName = "applicationName"
            case autoRollbackConfiguration = "autoRollbackConfiguration"
            case blueGreenDeploymentConfiguration = "blueGreenDeploymentConfiguration"
            case completeTime = "completeTime"
            case computePlatform = "computePlatform"
            case createTime = "createTime"
            case creator = "creator"
            case deploymentConfigName = "deploymentConfigName"
            case deploymentGroupName = "deploymentGroupName"
            case deploymentId = "deploymentId"
            case deploymentOverview = "deploymentOverview"
            case deploymentStatusMessages = "deploymentStatusMessages"
            case deploymentStyle = "deploymentStyle"
            case description = "description"
            case errorInformation = "errorInformation"
            case externalId = "externalId"
            case fileExistsBehavior = "fileExistsBehavior"
            case ignoreApplicationStopFailures = "ignoreApplicationStopFailures"
            case instanceTerminationWaitTimeStarted = "instanceTerminationWaitTimeStarted"
            case loadBalancerInfo = "loadBalancerInfo"
            case overrideAlarmConfiguration = "overrideAlarmConfiguration"
            case previousRevision = "previousRevision"
            case relatedDeployments = "relatedDeployments"
            case revision = "revision"
            case rollbackInfo = "rollbackInfo"
            case startTime = "startTime"
            case status = "status"
            case targetInstances = "targetInstances"
            case updateOutdatedInstancesOnly = "updateOutdatedInstancesOnly"
        }
    }

    public struct DeploymentOverview: AWSDecodableShape {
        /// The number of instances in the deployment in a failed state.
        public let failed: Int64?
        /// The number of instances in which the deployment is in progress.
        public let inProgress: Int64?
        /// The number of instances in the deployment in a pending state.
        public let pending: Int64?
        /// The number of instances in a replacement environment ready to receive traffic in a blue/green deployment.
        public let ready: Int64?
        /// The number of instances in the deployment in a skipped state.
        public let skipped: Int64?
        /// The number of instances in the deployment to which revisions have been successfully deployed.
        public let succeeded: Int64?

        @inlinable
        public init(failed: Int64? = nil, inProgress: Int64? = nil, pending: Int64? = nil, ready: Int64? = nil, skipped: Int64? = nil, succeeded: Int64? = nil) {
            self.failed = failed
            self.inProgress = inProgress
            self.pending = pending
            self.ready = ready
            self.skipped = skipped
            self.succeeded = succeeded
        }

        private enum CodingKeys: String, CodingKey {
            case failed = "Failed"
            case inProgress = "InProgress"
            case pending = "Pending"
            case ready = "Ready"
            case skipped = "Skipped"
            case succeeded = "Succeeded"
        }
    }

    public struct DeploymentReadyOption: AWSEncodableShape & AWSDecodableShape {
        /// Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.   CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.   STOP_DEPLOYMENT: Do not register new instances with a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.
        public let actionOnTimeout: DeploymentReadyAction?
        /// The number of minutes to wait before the status of a blue/green deployment is changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout.
        public let waitTimeInMinutes: Int?

        @inlinable
        public init(actionOnTimeout: DeploymentReadyAction? = nil, waitTimeInMinutes: Int? = nil) {
            self.actionOnTimeout = actionOnTimeout
            self.waitTimeInMinutes = waitTimeInMinutes
        }

        private enum CodingKeys: String, CodingKey {
            case actionOnTimeout = "actionOnTimeout"
            case waitTimeInMinutes = "waitTimeInMinutes"
        }
    }

    public struct DeploymentStyle: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether to route deployment traffic behind a load balancer.
        public let deploymentOption: DeploymentOption?
        /// Indicates whether to run an in-place deployment or a blue/green deployment.
        public let deploymentType: DeploymentType?

        @inlinable
        public init(deploymentOption: DeploymentOption? = nil, deploymentType: DeploymentType? = nil) {
            self.deploymentOption = deploymentOption
            self.deploymentType = deploymentType
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentOption = "deploymentOption"
            case deploymentType = "deploymentType"
        }
    }

    public struct DeploymentTarget: AWSDecodableShape {
        public let cloudFormationTarget: CloudFormationTarget?
        /// The deployment type that is specific to the deployment's compute platform or deployments initiated by a CloudFormation stack update.
        public let deploymentTargetType: DeploymentTargetType?
        ///  Information about the target for a deployment that uses the Amazon ECS compute platform.
        public let ecsTarget: ECSTarget?
        ///  Information about the target for a deployment that uses the EC2/On-premises compute platform.
        public let instanceTarget: InstanceTarget?
        ///  Information about the target for a deployment that uses the Lambda compute platform.
        public let lambdaTarget: LambdaTarget?

        @inlinable
        public init(cloudFormationTarget: CloudFormationTarget? = nil, deploymentTargetType: DeploymentTargetType? = nil, ecsTarget: ECSTarget? = nil, instanceTarget: InstanceTarget? = nil, lambdaTarget: LambdaTarget? = nil) {
            self.cloudFormationTarget = cloudFormationTarget
            self.deploymentTargetType = deploymentTargetType
            self.ecsTarget = ecsTarget
            self.instanceTarget = instanceTarget
            self.lambdaTarget = lambdaTarget
        }

        private enum CodingKeys: String, CodingKey {
            case cloudFormationTarget = "cloudFormationTarget"
            case deploymentTargetType = "deploymentTargetType"
            case ecsTarget = "ecsTarget"
            case instanceTarget = "instanceTarget"
            case lambdaTarget = "lambdaTarget"
        }
    }

    public struct DeregisterOnPremisesInstanceInput: AWSEncodableShape {
        /// The name of the on-premises instance to deregister.
        public let instanceName: String

        @inlinable
        public init(instanceName: String) {
            self.instanceName = instanceName
        }

        private enum CodingKeys: String, CodingKey {
            case instanceName = "instanceName"
        }
    }

    public struct Diagnostics: AWSDecodableShape {
        /// The associated error code:   Success: The specified script ran.   ScriptMissing: The specified script was not found in the specified location.   ScriptNotExecutable: The specified script is not a recognized executable file type.   ScriptTimedOut: The specified script did not finish running in the specified time period.   ScriptFailed: The specified script failed to run as expected.   UnknownError: The specified script did not run for an unknown reason.
        public let errorCode: LifecycleErrorCode?
        /// The last portion of the diagnostic log. If available, CodeDeploy returns up to the last 4 KB of the diagnostic log.
        public let logTail: String?
        /// The message associated with the error.
        public let message: String?
        /// The name of the script.
        public let scriptName: String?

        @inlinable
        public init(errorCode: LifecycleErrorCode? = nil, logTail: String? = nil, message: String? = nil, scriptName: String? = nil) {
            self.errorCode = errorCode
            self.logTail = logTail
            self.message = message
            self.scriptName = scriptName
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "errorCode"
            case logTail = "logTail"
            case message = "message"
            case scriptName = "scriptName"
        }
    }

    public struct EC2TagFilter: AWSEncodableShape & AWSDecodableShape {
        /// The tag filter key.
        public let key: String?
        /// The tag filter type:    KEY_ONLY: Key only.    VALUE_ONLY: Value only.    KEY_AND_VALUE: Key and value.
        public let type: EC2TagFilterType?
        /// The tag filter value.
        public let value: String?

        @inlinable
        public init(key: String? = nil, type: EC2TagFilterType? = nil, value: String? = nil) {
            self.key = key
            self.type = type
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case type = "Type"
            case value = "Value"
        }
    }

    public struct EC2TagSet: AWSEncodableShape & AWSDecodableShape {
        /// A list that contains other lists of Amazon EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.
        public let ec2TagSetList: [[EC2TagFilter]]?

        @inlinable
        public init(ec2TagSetList: [[EC2TagFilter]]? = nil) {
            self.ec2TagSetList = ec2TagSetList
        }

        private enum CodingKeys: String, CodingKey {
            case ec2TagSetList = "ec2TagSetList"
        }
    }

    public struct ECSService: AWSEncodableShape & AWSDecodableShape {
        ///  The name of the cluster that the Amazon ECS service is associated with.
        public let clusterName: String?
        ///  The name of the target Amazon ECS service.
        public let serviceName: String?

        @inlinable
        public init(clusterName: String? = nil, serviceName: String? = nil) {
            self.clusterName = clusterName
            self.serviceName = serviceName
        }

        private enum CodingKeys: String, CodingKey {
            case clusterName = "clusterName"
            case serviceName = "serviceName"
        }
    }

    public struct ECSTarget: AWSDecodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String?
        ///  The date and time when the target Amazon ECS application was updated by a deployment.
        public let lastUpdatedAt: Date?
        ///  The lifecycle events of the deployment to this target Amazon ECS application.
        public let lifecycleEvents: [LifecycleEvent]?
        ///  The status an Amazon ECS deployment's target ECS application.
        public let status: TargetStatus?
        ///  The Amazon Resource Name (ARN) of the target.
        public let targetArn: String?
        ///  The unique ID of a deployment target that has a type of ecsTarget.
        public let targetId: String?
        ///  The ECSTaskSet objects associated with the ECS target.
        public let taskSetsInfo: [ECSTaskSet]?

        @inlinable
        public init(deploymentId: String? = nil, lastUpdatedAt: Date? = nil, lifecycleEvents: [LifecycleEvent]? = nil, status: TargetStatus? = nil, targetArn: String? = nil, targetId: String? = nil, taskSetsInfo: [ECSTaskSet]? = nil) {
            self.deploymentId = deploymentId
            self.lastUpdatedAt = lastUpdatedAt
            self.lifecycleEvents = lifecycleEvents
            self.status = status
            self.targetArn = targetArn
            self.targetId = targetId
            self.taskSetsInfo = taskSetsInfo
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case lastUpdatedAt = "lastUpdatedAt"
            case lifecycleEvents = "lifecycleEvents"
            case status = "status"
            case targetArn = "targetArn"
            case targetId = "targetId"
            case taskSetsInfo = "taskSetsInfo"
        }
    }

    public struct ECSTaskSet: AWSDecodableShape {
        ///  The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After the updated task set is created, CodeDeploy shifts traffic to the new task set.
        public let desiredCount: Int64?
        ///  A unique ID of an ECSTaskSet.
        public let identifer: String?
        ///  The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. A task in the PENDING state is preparing to enter the RUNNING state. A task set enters the PENDING status when it launches for the first time, or when it is restarted after being in the STOPPED state.
        public let pendingCount: Int64?
        ///  The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. A task in the RUNNING state is running and ready for use.
        public let runningCount: Int64?
        ///  The status of the task set. There are three valid task set statuses:     PRIMARY: Indicates the task set is serving production traffic.     ACTIVE: Indicates the task set is not serving production traffic.     DRAINING: Indicates the tasks in the task set are being stopped and their corresponding targets are being deregistered from their target group.
        public let status: String?
        ///  The target group associated with the task set. The target group is used by CodeDeploy to manage traffic to a task set.
        public let targetGroup: TargetGroupInfo?
        ///  A label that identifies whether the ECS task set is an original target (BLUE) or a replacement target (GREEN).
        public let taskSetLabel: TargetLabel?
        ///  The percentage of traffic served by this task set.
        public let trafficWeight: Double?

        @inlinable
        public init(desiredCount: Int64? = nil, identifer: String? = nil, pendingCount: Int64? = nil, runningCount: Int64? = nil, status: String? = nil, targetGroup: TargetGroupInfo? = nil, taskSetLabel: TargetLabel? = nil, trafficWeight: Double? = nil) {
            self.desiredCount = desiredCount
            self.identifer = identifer
            self.pendingCount = pendingCount
            self.runningCount = runningCount
            self.status = status
            self.targetGroup = targetGroup
            self.taskSetLabel = taskSetLabel
            self.trafficWeight = trafficWeight
        }

        private enum CodingKeys: String, CodingKey {
            case desiredCount = "desiredCount"
            case identifer = "identifer"
            case pendingCount = "pendingCount"
            case runningCount = "runningCount"
            case status = "status"
            case targetGroup = "targetGroup"
            case taskSetLabel = "taskSetLabel"
            case trafficWeight = "trafficWeight"
        }
    }

    public struct ELBInfo: AWSEncodableShape & AWSDecodableShape {
        /// For blue/green deployments, the name of the Classic Load Balancer that is used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the Classic Load Balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment is complete.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct ErrorInformation: AWSDecodableShape {
        /// For more information, see Error Codes for CodeDeploy in the CodeDeploy User Guide. The error code:   APPLICATION_MISSING: The application was missing. This error code is most likely raised if the application is deleted after the deployment is created, but before it is started.   DEPLOYMENT_GROUP_MISSING: The deployment group was missing. This error code is most likely raised if the deployment group is deleted after the deployment is created, but before it is started.   HEALTH_CONSTRAINTS: The deployment failed on too many instances to be successfully deployed within the instance health constraints specified.   HEALTH_CONSTRAINTS_INVALID: The revision cannot be successfully deployed within the instance health constraints specified.   IAM_ROLE_MISSING: The service role cannot be accessed.   IAM_ROLE_PERMISSIONS: The service role does not have the correct permissions.   INTERNAL_ERROR: There was an internal error.   NO_EC2_SUBSCRIPTION: The calling account is not subscribed to Amazon EC2.   NO_INSTANCES: No instances were specified, or no instances can be found.   OVER_MAX_INSTANCES: The maximum number of instances was exceeded.   THROTTLED: The operation was throttled because the calling account exceeded the throttling limits of one or more Amazon Web Services services.   TIMEOUT: The deployment has timed out.   REVISION_MISSING: The revision ID was missing. This error code is most likely raised if the revision is deleted after the deployment is created, but before it is started.
        public let code: ErrorCode?
        /// An accompanying error message.
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "code"
            case message = "message"
        }
    }

    public struct GenericRevisionInfo: AWSDecodableShape {
        /// The deployment groups for which this is the current target revision.
        public let deploymentGroups: [String]?
        /// A comment about the revision.
        public let description: String?
        /// When the revision was first used by CodeDeploy.
        public let firstUsedTime: Date?
        /// When the revision was last used by CodeDeploy.
        public let lastUsedTime: Date?
        /// When the revision was registered with CodeDeploy.
        public let registerTime: Date?

        @inlinable
        public init(deploymentGroups: [String]? = nil, description: String? = nil, firstUsedTime: Date? = nil, lastUsedTime: Date? = nil, registerTime: Date? = nil) {
            self.deploymentGroups = deploymentGroups
            self.description = description
            self.firstUsedTime = firstUsedTime
            self.lastUsedTime = lastUsedTime
            self.registerTime = registerTime
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentGroups = "deploymentGroups"
            case description = "description"
            case firstUsedTime = "firstUsedTime"
            case lastUsedTime = "lastUsedTime"
            case registerTime = "registerTime"
        }
    }

    public struct GetApplicationInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String

        @inlinable
        public init(applicationName: String) {
            self.applicationName = applicationName
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
        }
    }

    public struct GetApplicationOutput: AWSDecodableShape {
        /// Information about the application.
        public let application: ApplicationInfo?

        @inlinable
        public init(application: ApplicationInfo? = nil) {
            self.application = application
        }

        private enum CodingKeys: String, CodingKey {
            case application = "application"
        }
    }

    public struct GetApplicationRevisionInput: AWSEncodableShape {
        /// The name of the application that corresponds to the revision.
        public let applicationName: String
        /// Information about the application revision to get, including type and location.
        public let revision: RevisionLocation

        @inlinable
        public init(applicationName: String, revision: RevisionLocation) {
            self.applicationName = applicationName
            self.revision = revision
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case revision = "revision"
        }
    }

    public struct GetApplicationRevisionOutput: AWSDecodableShape {
        /// The name of the application that corresponds to the revision.
        public let applicationName: String?
        /// Additional information about the revision, including type and location.
        public let revision: RevisionLocation?
        /// General information about the revision.
        public let revisionInfo: GenericRevisionInfo?

        @inlinable
        public init(applicationName: String? = nil, revision: RevisionLocation? = nil, revisionInfo: GenericRevisionInfo? = nil) {
            self.applicationName = applicationName
            self.revision = revision
            self.revisionInfo = revisionInfo
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case revision = "revision"
            case revisionInfo = "revisionInfo"
        }
    }

    public struct GetDeploymentConfigInput: AWSEncodableShape {
        /// The name of a deployment configuration associated with the user or Amazon Web Services account.
        public let deploymentConfigName: String

        @inlinable
        public init(deploymentConfigName: String) {
            self.deploymentConfigName = deploymentConfigName
        }

        public func validate(name: String) throws {
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, max: 100)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentConfigName = "deploymentConfigName"
        }
    }

    public struct GetDeploymentConfigOutput: AWSDecodableShape {
        /// Information about the deployment configuration.
        public let deploymentConfigInfo: DeploymentConfigInfo?

        @inlinable
        public init(deploymentConfigInfo: DeploymentConfigInfo? = nil) {
            self.deploymentConfigInfo = deploymentConfigInfo
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentConfigInfo = "deploymentConfigInfo"
        }
    }

    public struct GetDeploymentGroupInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String
        /// The name of a deployment group for the specified application.
        public let deploymentGroupName: String

        @inlinable
        public init(applicationName: String, deploymentGroupName: String) {
            self.applicationName = applicationName
            self.deploymentGroupName = deploymentGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, max: 100)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case deploymentGroupName = "deploymentGroupName"
        }
    }

    public struct GetDeploymentGroupOutput: AWSDecodableShape {
        /// Information about the deployment group.
        public let deploymentGroupInfo: DeploymentGroupInfo?

        @inlinable
        public init(deploymentGroupInfo: DeploymentGroupInfo? = nil) {
            self.deploymentGroupInfo = deploymentGroupInfo
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentGroupInfo = "deploymentGroupInfo"
        }
    }

    public struct GetDeploymentInput: AWSEncodableShape {
        ///  The unique ID of a deployment associated with the user or Amazon Web Services account.
        public let deploymentId: String

        @inlinable
        public init(deploymentId: String) {
            self.deploymentId = deploymentId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
        }
    }

    public struct GetDeploymentInstanceInput: AWSEncodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String
        ///  The unique ID of an instance in the deployment group.
        public let instanceId: String

        @inlinable
        public init(deploymentId: String, instanceId: String) {
            self.deploymentId = deploymentId
            self.instanceId = instanceId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case instanceId = "instanceId"
        }
    }

    public struct GetDeploymentInstanceOutput: AWSDecodableShape {
        ///  Information about the instance.
        public let instanceSummary: InstanceSummary?

        @inlinable
        public init(instanceSummary: InstanceSummary? = nil) {
            self.instanceSummary = instanceSummary
        }

        private enum CodingKeys: String, CodingKey {
            case instanceSummary = "instanceSummary"
        }
    }

    public struct GetDeploymentOutput: AWSDecodableShape {
        /// Information about the deployment.
        public let deploymentInfo: DeploymentInfo?

        @inlinable
        public init(deploymentInfo: DeploymentInfo? = nil) {
            self.deploymentInfo = deploymentInfo
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentInfo = "deploymentInfo"
        }
    }

    public struct GetDeploymentTargetInput: AWSEncodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String
        ///  The unique ID of a deployment target.
        public let targetId: String

        @inlinable
        public init(deploymentId: String, targetId: String) {
            self.deploymentId = deploymentId
            self.targetId = targetId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case targetId = "targetId"
        }
    }

    public struct GetDeploymentTargetOutput: AWSDecodableShape {
        ///  A deployment target that contains information about a deployment such as its status, lifecycle events, and when it was last updated. It also contains metadata about the deployment target. The deployment target metadata depends on the deployment target's type (instanceTarget, lambdaTarget, or ecsTarget).
        public let deploymentTarget: DeploymentTarget?

        @inlinable
        public init(deploymentTarget: DeploymentTarget? = nil) {
            self.deploymentTarget = deploymentTarget
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentTarget = "deploymentTarget"
        }
    }

    public struct GetOnPremisesInstanceInput: AWSEncodableShape {
        ///  The name of the on-premises instance about which to get information.
        public let instanceName: String

        @inlinable
        public init(instanceName: String) {
            self.instanceName = instanceName
        }

        private enum CodingKeys: String, CodingKey {
            case instanceName = "instanceName"
        }
    }

    public struct GetOnPremisesInstanceOutput: AWSDecodableShape {
        ///  Information about the on-premises instance.
        public let instanceInfo: InstanceInfo?

        @inlinable
        public init(instanceInfo: InstanceInfo? = nil) {
            self.instanceInfo = instanceInfo
        }

        private enum CodingKeys: String, CodingKey {
            case instanceInfo = "instanceInfo"
        }
    }

    public struct GitHubLocation: AWSEncodableShape & AWSDecodableShape {
        /// The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
        public let commitId: String?
        /// The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.  Specified as account/repository.
        public let repository: String?

        @inlinable
        public init(commitId: String? = nil, repository: String? = nil) {
            self.commitId = commitId
            self.repository = repository
        }

        private enum CodingKeys: String, CodingKey {
            case commitId = "commitId"
            case repository = "repository"
        }
    }

    public struct GreenFleetProvisioningOption: AWSEncodableShape & AWSDecodableShape {
        /// The method used to add instances to a replacement environment.    DISCOVER_EXISTING: Use instances that already exist or will be created manually.    COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.
        public let action: GreenFleetProvisioningAction?

        @inlinable
        public init(action: GreenFleetProvisioningAction? = nil) {
            self.action = action
        }

        private enum CodingKeys: String, CodingKey {
            case action = "action"
        }
    }

    public struct InstanceInfo: AWSDecodableShape {
        /// If the on-premises instance was deregistered, the time at which the on-premises instance was deregistered.
        public let deregisterTime: Date?
        /// The ARN of the IAM session associated with the on-premises instance.
        public let iamSessionArn: String?
        /// The user ARN associated with the on-premises instance.
        public let iamUserArn: String?
        /// The ARN of the on-premises instance.
        public let instanceArn: String?
        /// The name of the on-premises instance.
        public let instanceName: String?
        /// The time at which the on-premises instance was registered.
        public let registerTime: Date?
        /// The tags currently associated with the on-premises instance.
        public let tags: [Tag]?

        @inlinable
        public init(deregisterTime: Date? = nil, iamSessionArn: String? = nil, iamUserArn: String? = nil, instanceArn: String? = nil, instanceName: String? = nil, registerTime: Date? = nil, tags: [Tag]? = nil) {
            self.deregisterTime = deregisterTime
            self.iamSessionArn = iamSessionArn
            self.iamUserArn = iamUserArn
            self.instanceArn = instanceArn
            self.instanceName = instanceName
            self.registerTime = registerTime
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case deregisterTime = "deregisterTime"
            case iamSessionArn = "iamSessionArn"
            case iamUserArn = "iamUserArn"
            case instanceArn = "instanceArn"
            case instanceName = "instanceName"
            case registerTime = "registerTime"
            case tags = "tags"
        }
    }

    public struct InstanceSummary: AWSDecodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String?
        /// The instance ID.
        public let instanceId: String?
        /// Information about which environment an instance belongs to in a blue/green deployment.   BLUE: The instance is part of the original environment.   GREEN: The instance is part of the replacement environment.
        public let instanceType: InstanceType?
        /// A timestamp that indicates when the instance information was last updated.
        public let lastUpdatedAt: Date?
        /// A list of lifecycle events for this instance.
        public let lifecycleEvents: [LifecycleEvent]?
        /// The deployment status for this instance:    Pending: The deployment is pending for this instance.    In Progress: The deployment is in progress for this instance.    Succeeded: The deployment has succeeded for this instance.    Failed: The deployment has failed for this instance.    Skipped: The deployment has been skipped for this instance.    Unknown: The deployment status is unknown for this instance.
        public let status: InstanceStatus?

        @inlinable
        public init(deploymentId: String? = nil, instanceId: String? = nil, instanceType: InstanceType? = nil, lastUpdatedAt: Date? = nil, lifecycleEvents: [LifecycleEvent]? = nil, status: InstanceStatus? = nil) {
            self.deploymentId = deploymentId
            self.instanceId = instanceId
            self.instanceType = instanceType
            self.lastUpdatedAt = lastUpdatedAt
            self.lifecycleEvents = lifecycleEvents
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case instanceId = "instanceId"
            case instanceType = "instanceType"
            case lastUpdatedAt = "lastUpdatedAt"
            case lifecycleEvents = "lifecycleEvents"
            case status = "status"
        }
    }

    public struct InstanceTarget: AWSDecodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String?
        ///  A label that identifies whether the instance is an original target (BLUE) or a replacement target (GREEN).
        public let instanceLabel: TargetLabel?
        ///  The date and time when the target instance was updated by a deployment.
        public let lastUpdatedAt: Date?
        ///  The lifecycle events of the deployment to this target instance.
        public let lifecycleEvents: [LifecycleEvent]?
        ///  The status an EC2/On-premises deployment's target instance.
        public let status: TargetStatus?
        ///  The Amazon Resource Name (ARN) of the target.
        public let targetArn: String?
        ///  The unique ID of a deployment target that has a type of instanceTarget.
        public let targetId: String?

        @inlinable
        public init(deploymentId: String? = nil, instanceLabel: TargetLabel? = nil, lastUpdatedAt: Date? = nil, lifecycleEvents: [LifecycleEvent]? = nil, status: TargetStatus? = nil, targetArn: String? = nil, targetId: String? = nil) {
            self.deploymentId = deploymentId
            self.instanceLabel = instanceLabel
            self.lastUpdatedAt = lastUpdatedAt
            self.lifecycleEvents = lifecycleEvents
            self.status = status
            self.targetArn = targetArn
            self.targetId = targetId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case instanceLabel = "instanceLabel"
            case lastUpdatedAt = "lastUpdatedAt"
            case lifecycleEvents = "lifecycleEvents"
            case status = "status"
            case targetArn = "targetArn"
            case targetId = "targetId"
        }
    }

    public struct LambdaFunctionInfo: AWSDecodableShape {
        ///  The version of a Lambda function that production traffic points to.
        public let currentVersion: String?
        ///  The alias of a Lambda function. For more information, see Lambda Function Aliases in the Lambda Developer Guide.
        public let functionAlias: String?
        ///  The name of a Lambda function.
        public let functionName: String?
        ///  The version of a Lambda function that production traffic points to after the Lambda function is deployed.
        public let targetVersion: String?
        ///  The percentage of production traffic that the target version of a Lambda function receives.
        public let targetVersionWeight: Double?

        @inlinable
        public init(currentVersion: String? = nil, functionAlias: String? = nil, functionName: String? = nil, targetVersion: String? = nil, targetVersionWeight: Double? = nil) {
            self.currentVersion = currentVersion
            self.functionAlias = functionAlias
            self.functionName = functionName
            self.targetVersion = targetVersion
            self.targetVersionWeight = targetVersionWeight
        }

        private enum CodingKeys: String, CodingKey {
            case currentVersion = "currentVersion"
            case functionAlias = "functionAlias"
            case functionName = "functionName"
            case targetVersion = "targetVersion"
            case targetVersionWeight = "targetVersionWeight"
        }
    }

    public struct LambdaTarget: AWSDecodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String?
        ///  A LambdaFunctionInfo object that describes a target Lambda function.
        public let lambdaFunctionInfo: LambdaFunctionInfo?
        ///  The date and time when the target Lambda function was updated by a deployment.
        public let lastUpdatedAt: Date?
        ///  The lifecycle events of the deployment to this target Lambda function.
        public let lifecycleEvents: [LifecycleEvent]?
        ///  The status an Lambda deployment's target Lambda function.
        public let status: TargetStatus?
        ///  The Amazon Resource Name (ARN) of the target.
        public let targetArn: String?
        ///  The unique ID of a deployment target that has a type of lambdaTarget.
        public let targetId: String?

        @inlinable
        public init(deploymentId: String? = nil, lambdaFunctionInfo: LambdaFunctionInfo? = nil, lastUpdatedAt: Date? = nil, lifecycleEvents: [LifecycleEvent]? = nil, status: TargetStatus? = nil, targetArn: String? = nil, targetId: String? = nil) {
            self.deploymentId = deploymentId
            self.lambdaFunctionInfo = lambdaFunctionInfo
            self.lastUpdatedAt = lastUpdatedAt
            self.lifecycleEvents = lifecycleEvents
            self.status = status
            self.targetArn = targetArn
            self.targetId = targetId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case lambdaFunctionInfo = "lambdaFunctionInfo"
            case lastUpdatedAt = "lastUpdatedAt"
            case lifecycleEvents = "lifecycleEvents"
            case status = "status"
            case targetArn = "targetArn"
            case targetId = "targetId"
        }
    }

    public struct LastDeploymentInfo: AWSDecodableShape {
        /// A timestamp that indicates when the most recent deployment to the deployment group started.
        public let createTime: Date?
        ///  The unique ID of a deployment.
        public let deploymentId: String?
        /// A timestamp that indicates when the most recent deployment to the deployment group was complete.
        public let endTime: Date?
        /// The status of the most recent deployment.
        public let status: DeploymentStatus?

        @inlinable
        public init(createTime: Date? = nil, deploymentId: String? = nil, endTime: Date? = nil, status: DeploymentStatus? = nil) {
            self.createTime = createTime
            self.deploymentId = deploymentId
            self.endTime = endTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createTime = "createTime"
            case deploymentId = "deploymentId"
            case endTime = "endTime"
            case status = "status"
        }
    }

    public struct LifecycleEvent: AWSDecodableShape {
        /// Diagnostic information about the deployment lifecycle event.
        public let diagnostics: Diagnostics?
        /// A timestamp that indicates when the deployment lifecycle event ended.
        public let endTime: Date?
        /// The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
        public let lifecycleEventName: String?
        /// A timestamp that indicates when the deployment lifecycle event started.
        public let startTime: Date?
        /// The deployment lifecycle event status:   Pending: The deployment lifecycle event is pending.   InProgress: The deployment lifecycle event is in progress.   Succeeded: The deployment lifecycle event ran successfully.   Failed: The deployment lifecycle event has failed.   Skipped: The deployment lifecycle event has been skipped.   Unknown: The deployment lifecycle event is unknown.
        public let status: LifecycleEventStatus?

        @inlinable
        public init(diagnostics: Diagnostics? = nil, endTime: Date? = nil, lifecycleEventName: String? = nil, startTime: Date? = nil, status: LifecycleEventStatus? = nil) {
            self.diagnostics = diagnostics
            self.endTime = endTime
            self.lifecycleEventName = lifecycleEventName
            self.startTime = startTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case diagnostics = "diagnostics"
            case endTime = "endTime"
            case lifecycleEventName = "lifecycleEventName"
            case startTime = "startTime"
            case status = "status"
        }
    }

    public struct ListApplicationRevisionsInput: AWSEncodableShape {
        ///  The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String
        ///  Whether to list revisions based on whether the revision is the target revision of a deployment group:     include: List revisions that are target revisions of a deployment group.    exclude: Do not list revisions that are target revisions of a deployment group.    ignore: List all revisions.
        public let deployed: ListStateFilterAction?
        /// An identifier returned from the previous ListApplicationRevisions call. It can be used to return the next set of applications in the list.
        public let nextToken: String?
        ///  An Amazon S3 bucket name to limit the search for revisions.  If set to null, all of the user's buckets are searched.
        public let s3Bucket: String?
        ///  A key prefix for the set of Amazon S3 objects to limit the search for revisions.
        public let s3KeyPrefix: String?
        /// The column name to use to sort the list results:    registerTime: Sort by the time the revisions were registered with CodeDeploy.    firstUsedTime: Sort by the time the revisions were first used in a deployment.    lastUsedTime: Sort by the time the revisions were last used in a deployment.   If not specified or set to null, the results are returned in an arbitrary order.
        public let sortBy: ApplicationRevisionSortBy?
        ///  The order in which to sort the list results:     ascending: ascending order.    descending: descending order.   If not specified, the results are sorted in ascending order. If set to null, the results are sorted in an arbitrary order.
        public let sortOrder: SortOrder?

        @inlinable
        public init(applicationName: String, deployed: ListStateFilterAction? = nil, nextToken: String? = nil, s3Bucket: String? = nil, s3KeyPrefix: String? = nil, sortBy: ApplicationRevisionSortBy? = nil, sortOrder: SortOrder? = nil) {
            self.applicationName = applicationName
            self.deployed = deployed
            self.nextToken = nextToken
            self.s3Bucket = s3Bucket
            self.s3KeyPrefix = s3KeyPrefix
            self.sortBy = sortBy
            self.sortOrder = sortOrder
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case deployed = "deployed"
            case nextToken = "nextToken"
            case s3Bucket = "s3Bucket"
            case s3KeyPrefix = "s3KeyPrefix"
            case sortBy = "sortBy"
            case sortOrder = "sortOrder"
        }
    }

    public struct ListApplicationRevisionsOutput: AWSDecodableShape {
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list application revisions call to return the next set of application revisions in the list.
        public let nextToken: String?
        /// A list of locations that contain the matching revisions.
        public let revisions: [RevisionLocation]?

        @inlinable
        public init(nextToken: String? = nil, revisions: [RevisionLocation]? = nil) {
            self.nextToken = nextToken
            self.revisions = revisions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case revisions = "revisions"
        }
    }

    public struct ListApplicationsInput: AWSEncodableShape {
        /// An identifier returned from the previous list applications call. It can be used to return the next set of applications in the list.
        public let nextToken: String?

        @inlinable
        public init(nextToken: String? = nil) {
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
        }
    }

    public struct ListApplicationsOutput: AWSDecodableShape {
        /// A list of application names.
        public let applications: [String]?
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list applications call to return the next set of applications in the list.
        public let nextToken: String?

        @inlinable
        public init(applications: [String]? = nil, nextToken: String? = nil) {
            self.applications = applications
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case applications = "applications"
            case nextToken = "nextToken"
        }
    }

    public struct ListDeploymentConfigsInput: AWSEncodableShape {
        /// An identifier returned from the previous ListDeploymentConfigs call. It can be used to return the next set of deployment configurations in the list.
        public let nextToken: String?

        @inlinable
        public init(nextToken: String? = nil) {
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
        }
    }

    public struct ListDeploymentConfigsOutput: AWSDecodableShape {
        /// A list of deployment configurations, including built-in configurations such as CodeDeployDefault.OneAtATime.
        public let deploymentConfigsList: [String]?
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment configurations call to return the next set of deployment configurations in the list.
        public let nextToken: String?

        @inlinable
        public init(deploymentConfigsList: [String]? = nil, nextToken: String? = nil) {
            self.deploymentConfigsList = deploymentConfigsList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentConfigsList = "deploymentConfigsList"
            case nextToken = "nextToken"
        }
    }

    public struct ListDeploymentGroupsInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String
        /// An identifier returned from the previous list deployment groups call. It can be used to return the next set of deployment groups in the list.
        public let nextToken: String?

        @inlinable
        public init(applicationName: String, nextToken: String? = nil) {
            self.applicationName = applicationName
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case nextToken = "nextToken"
        }
    }

    public struct ListDeploymentGroupsOutput: AWSDecodableShape {
        /// The application name.
        public let applicationName: String?
        /// A list of deployment group names.
        public let deploymentGroups: [String]?
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment groups call to return the next set of deployment groups in the list.
        public let nextToken: String?

        @inlinable
        public init(applicationName: String? = nil, deploymentGroups: [String]? = nil, nextToken: String? = nil) {
            self.applicationName = applicationName
            self.deploymentGroups = deploymentGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case deploymentGroups = "deploymentGroups"
            case nextToken = "nextToken"
        }
    }

    public struct ListDeploymentInstancesInput: AWSEncodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String
        /// A subset of instances to list by status:    Pending: Include those instances with pending deployments.    InProgress: Include those instances where deployments are still in progress.    Succeeded: Include those instances with successful deployments.    Failed: Include those instances with failed deployments.    Skipped: Include those instances with skipped deployments.    Unknown: Include those instances with deployments in an unknown state.
        public let instanceStatusFilter: [InstanceStatus]?
        /// The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.
        public let instanceTypeFilter: [InstanceType]?
        /// An identifier returned from the previous list deployment instances call. It can be used to return the next set of deployment instances in the list.
        public let nextToken: String?

        @inlinable
        public init(deploymentId: String, instanceStatusFilter: [InstanceStatus]? = nil, instanceTypeFilter: [InstanceType]? = nil, nextToken: String? = nil) {
            self.deploymentId = deploymentId
            self.instanceStatusFilter = instanceStatusFilter
            self.instanceTypeFilter = instanceTypeFilter
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case instanceStatusFilter = "instanceStatusFilter"
            case instanceTypeFilter = "instanceTypeFilter"
            case nextToken = "nextToken"
        }
    }

    public struct ListDeploymentInstancesOutput: AWSDecodableShape {
        /// A list of instance IDs.
        public let instancesList: [String]?
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment instances call to return the next set of deployment instances in the list.
        public let nextToken: String?

        @inlinable
        public init(instancesList: [String]? = nil, nextToken: String? = nil) {
            self.instancesList = instancesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case instancesList = "instancesList"
            case nextToken = "nextToken"
        }
    }

    public struct ListDeploymentTargetsInput: AWSEncodableShape {
        ///  The unique ID of a deployment.
        public let deploymentId: String
        ///  A token identifier returned from the previous ListDeploymentTargets call. It can be used to return the next set of deployment targets in the list.
        public let nextToken: String?
        ///  A key used to filter the returned targets. The two valid values are:    TargetStatus - A TargetStatus filter string can be Failed, InProgress, Pending, Ready, Skipped, Succeeded, or Unknown.     ServerInstanceLabel - A ServerInstanceLabel filter string can be Blue or Green.
        public let targetFilters: [TargetFilterName: [String]]?

        @inlinable
        public init(deploymentId: String, nextToken: String? = nil, targetFilters: [TargetFilterName: [String]]? = nil) {
            self.deploymentId = deploymentId
            self.nextToken = nextToken
            self.targetFilters = targetFilters
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case nextToken = "nextToken"
            case targetFilters = "targetFilters"
        }
    }

    public struct ListDeploymentTargetsOutput: AWSDecodableShape {
        ///  If a large amount of information is returned, a token identifier is also returned. It can be used in a subsequent ListDeploymentTargets call to return the next set of deployment targets in the list.
        public let nextToken: String?
        ///  The unique IDs of deployment targets.
        public let targetIds: [String]?

        @inlinable
        public init(nextToken: String? = nil, targetIds: [String]? = nil) {
            self.nextToken = nextToken
            self.targetIds = targetIds
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case targetIds = "targetIds"
        }
    }

    public struct ListDeploymentsInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.  If applicationName is specified, then deploymentGroupName must be specified. If it is not specified, then deploymentGroupName must not be specified.
        public let applicationName: String?
        /// A time range (start and end) for returning a subset of the list of deployments.
        public let createTimeRange: TimeRange?
        /// The name of a deployment group for the specified application.  If deploymentGroupName is specified, then applicationName must be specified. If it is not specified, then applicationName must not be specified.
        public let deploymentGroupName: String?
        /// The unique ID of an external resource for returning deployments linked to the external resource.
        public let externalId: String?
        /// A subset of deployments to list by status:    Created: Include created deployments in the resulting list.    Queued: Include queued deployments in the resulting list.    In Progress: Include in-progress deployments in the resulting list.    Succeeded: Include successful deployments in the resulting list.    Failed: Include failed deployments in the resulting list.    Stopped: Include stopped deployments in the resulting list.
        public let includeOnlyStatuses: [DeploymentStatus]?
        /// An identifier returned from the previous list deployments call. It can be used to return the next set of deployments in the list.
        public let nextToken: String?

        @inlinable
        public init(applicationName: String? = nil, createTimeRange: TimeRange? = nil, deploymentGroupName: String? = nil, externalId: String? = nil, includeOnlyStatuses: [DeploymentStatus]? = nil, nextToken: String? = nil) {
            self.applicationName = applicationName
            self.createTimeRange = createTimeRange
            self.deploymentGroupName = deploymentGroupName
            self.externalId = externalId
            self.includeOnlyStatuses = includeOnlyStatuses
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, max: 100)
            try self.validate(self.deploymentGroupName, name: "deploymentGroupName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case createTimeRange = "createTimeRange"
            case deploymentGroupName = "deploymentGroupName"
            case externalId = "externalId"
            case includeOnlyStatuses = "includeOnlyStatuses"
            case nextToken = "nextToken"
        }
    }

    public struct ListDeploymentsOutput: AWSDecodableShape {
        /// A list of deployment IDs.
        public let deployments: [String]?
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployments call to return the next set of deployments in the list.
        public let nextToken: String?

        @inlinable
        public init(deployments: [String]? = nil, nextToken: String? = nil) {
            self.deployments = deployments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case deployments = "deployments"
            case nextToken = "nextToken"
        }
    }

    public struct ListGitHubAccountTokenNamesInput: AWSEncodableShape {
        /// An identifier returned from the previous ListGitHubAccountTokenNames call. It can be used to return the next set of names in the list.
        public let nextToken: String?

        @inlinable
        public init(nextToken: String? = nil) {
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
        }
    }

    public struct ListGitHubAccountTokenNamesOutput: AWSDecodableShape {
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent ListGitHubAccountTokenNames call to return the next set of names in the list.
        public let nextToken: String?
        /// A list of names of connections to GitHub accounts.
        public let tokenNameList: [String]?

        @inlinable
        public init(nextToken: String? = nil, tokenNameList: [String]? = nil) {
            self.nextToken = nextToken
            self.tokenNameList = tokenNameList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case tokenNameList = "tokenNameList"
        }
    }

    public struct ListOnPremisesInstancesInput: AWSEncodableShape {
        /// An identifier returned from the previous list on-premises instances call. It can be used to return the next set of on-premises instances in the list.
        public let nextToken: String?
        /// The registration status of the on-premises instances:    Deregistered: Include deregistered on-premises instances in the resulting list.    Registered: Include registered on-premises instances in the resulting list.
        public let registrationStatus: RegistrationStatus?
        /// The on-premises instance tags that are used to restrict the on-premises instance names returned.
        public let tagFilters: [TagFilter]?

        @inlinable
        public init(nextToken: String? = nil, registrationStatus: RegistrationStatus? = nil, tagFilters: [TagFilter]? = nil) {
            self.nextToken = nextToken
            self.registrationStatus = registrationStatus
            self.tagFilters = tagFilters
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case registrationStatus = "registrationStatus"
            case tagFilters = "tagFilters"
        }
    }

    public struct ListOnPremisesInstancesOutput: AWSDecodableShape {
        /// The list of matching on-premises instance names.
        public let instanceNames: [String]?
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list on-premises instances call to return the next set of on-premises instances in the list.
        public let nextToken: String?

        @inlinable
        public init(instanceNames: [String]? = nil, nextToken: String? = nil) {
            self.instanceNames = instanceNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case instanceNames = "instanceNames"
            case nextToken = "nextToken"
        }
    }

    public struct ListTagsForResourceInput: AWSEncodableShape {
        /// An identifier returned from the previous ListTagsForResource call. It can be used to return the next set of applications in the list.
        public let nextToken: String?
        ///  The ARN of a CodeDeploy resource. ListTagsForResource returns all the tags associated with the resource that is identified by the ResourceArn.
        public let resourceArn: String

        @inlinable
        public init(nextToken: String? = nil, resourceArn: String) {
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceOutput: AWSDecodableShape {
        /// If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list application revisions call to return the next set of application revisions in the list.
        public let nextToken: String?
        ///  A list of tags returned by ListTagsForResource. The tags are associated with the resource identified by the input ResourceArn parameter.
        public let tags: [Tag]?

        @inlinable
        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tags = "Tags"
        }
    }

    public struct LoadBalancerInfo: AWSEncodableShape & AWSDecodableShape {
        /// An array that contains information about the load balancers to use for load balancing in a deployment. If you're using Classic Load Balancers, specify those load balancers in this array.   You can add up to 10 load balancers to the array.   If you're using Application Load Balancers or Network Load Balancers, use the targetGroupInfoList array instead of this one.
        public let elbInfoList: [ELBInfo]?
        /// An array that contains information about the target groups to use for load balancing in a deployment. If you're using Application Load Balancers and Network Load Balancers, specify their associated target groups in this array.  You can add up to 10 target groups to the array.   If you're using Classic Load Balancers, use the elbInfoList array instead of this one.
        public let targetGroupInfoList: [TargetGroupInfo]?
        ///  The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.
        public let targetGroupPairInfoList: [TargetGroupPairInfo]?

        @inlinable
        public init(elbInfoList: [ELBInfo]? = nil, targetGroupInfoList: [TargetGroupInfo]? = nil, targetGroupPairInfoList: [TargetGroupPairInfo]? = nil) {
            self.elbInfoList = elbInfoList
            self.targetGroupInfoList = targetGroupInfoList
            self.targetGroupPairInfoList = targetGroupPairInfoList
        }

        private enum CodingKeys: String, CodingKey {
            case elbInfoList = "elbInfoList"
            case targetGroupInfoList = "targetGroupInfoList"
            case targetGroupPairInfoList = "targetGroupPairInfoList"
        }
    }

    public struct MinimumHealthyHosts: AWSEncodableShape & AWSDecodableShape {
        /// The minimum healthy instance type:    HOST_COUNT: The minimum number of healthy instances as an absolute value.    FLEET_PERCENT: The minimum number of healthy instances as a percentage of the total number of instances in the deployment.   In an example of nine instances, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment is successful if six or more instances are deployed to successfully. Otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instances at a time. The deployment is successful if four or more instances are deployed to successfully. Otherwise, the deployment fails.  In a call to the GetDeploymentConfig, CodeDeployDefault.OneAtATime returns a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, CodeDeploy attempts to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment is still successful.  For more information, see CodeDeploy Instance Health in the CodeDeploy User Guide.
        public let type: MinimumHealthyHostsType?
        /// The minimum healthy instance value.
        public let value: Int?

        @inlinable
        public init(type: MinimumHealthyHostsType? = nil, value: Int? = nil) {
            self.type = type
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case type = "type"
            case value = "value"
        }
    }

    public struct MinimumHealthyHostsPerZone: AWSEncodableShape & AWSDecodableShape {
        /// The type associated with the MinimumHealthyHostsPerZone option.
        public let type: MinimumHealthyHostsPerZoneType?
        /// The value associated with the MinimumHealthyHostsPerZone option.
        public let value: Int?

        @inlinable
        public init(type: MinimumHealthyHostsPerZoneType? = nil, value: Int? = nil) {
            self.type = type
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case type = "type"
            case value = "value"
        }
    }

    public struct OnPremisesTagSet: AWSEncodableShape & AWSDecodableShape {
        /// A list that contains other lists of on-premises instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.
        public let onPremisesTagSetList: [[TagFilter]]?

        @inlinable
        public init(onPremisesTagSetList: [[TagFilter]]? = nil) {
            self.onPremisesTagSetList = onPremisesTagSetList
        }

        private enum CodingKeys: String, CodingKey {
            case onPremisesTagSetList = "onPremisesTagSetList"
        }
    }

    public struct PutLifecycleEventHookExecutionStatusInput: AWSEncodableShape {
        ///  The unique ID of a deployment. Pass this ID to a Lambda function that validates a deployment lifecycle event.
        public let deploymentId: String?
        ///  The execution ID of a deployment's lifecycle hook. A deployment lifecycle hook is specified in the hooks section of the AppSpec file.
        public let lifecycleEventHookExecutionId: String?
        /// The result of a Lambda function that validates a deployment lifecycle event. The values listed in Valid Values are valid for lifecycle statuses in general; however, only Succeeded and Failed can be passed successfully in your API call.
        public let status: LifecycleEventStatus?

        @inlinable
        public init(deploymentId: String? = nil, lifecycleEventHookExecutionId: String? = nil, status: LifecycleEventStatus? = nil) {
            self.deploymentId = deploymentId
            self.lifecycleEventHookExecutionId = lifecycleEventHookExecutionId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
            case lifecycleEventHookExecutionId = "lifecycleEventHookExecutionId"
            case status = "status"
        }
    }

    public struct PutLifecycleEventHookExecutionStatusOutput: AWSDecodableShape {
        /// The execution ID of the lifecycle event hook. A hook is specified in the hooks section of the deployment's AppSpec file.
        public let lifecycleEventHookExecutionId: String?

        @inlinable
        public init(lifecycleEventHookExecutionId: String? = nil) {
            self.lifecycleEventHookExecutionId = lifecycleEventHookExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case lifecycleEventHookExecutionId = "lifecycleEventHookExecutionId"
        }
    }

    public struct RawString: AWSEncodableShape & AWSDecodableShape {
        /// The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
        public let content: String?
        /// The SHA256 hash value of the revision content.
        public let sha256: String?

        @inlinable
        public init(content: String? = nil, sha256: String? = nil) {
            self.content = content
            self.sha256 = sha256
        }

        private enum CodingKeys: String, CodingKey {
            case content = "content"
            case sha256 = "sha256"
        }
    }

    public struct RegisterApplicationRevisionInput: AWSEncodableShape {
        /// The name of an CodeDeploy application associated with the user or Amazon Web Services account.
        public let applicationName: String
        /// A comment about the revision.
        public let description: String?
        /// Information about the application revision to register, including type and location.
        public let revision: RevisionLocation

        @inlinable
        public init(applicationName: String, description: String? = nil, revision: RevisionLocation) {
            self.applicationName = applicationName
            self.description = description
            self.revision = revision
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case description = "description"
            case revision = "revision"
        }
    }

    public struct RegisterOnPremisesInstanceInput: AWSEncodableShape {
        /// The ARN of the IAM session to associate with the on-premises instance.
        public let iamSessionArn: String?
        /// The ARN of the user to associate with the on-premises instance.
        public let iamUserArn: String?
        /// The name of the on-premises instance to register.
        public let instanceName: String

        @inlinable
        public init(iamSessionArn: String? = nil, iamUserArn: String? = nil, instanceName: String) {
            self.iamSessionArn = iamSessionArn
            self.iamUserArn = iamUserArn
            self.instanceName = instanceName
        }

        private enum CodingKeys: String, CodingKey {
            case iamSessionArn = "iamSessionArn"
            case iamUserArn = "iamUserArn"
            case instanceName = "instanceName"
        }
    }

    public struct RelatedDeployments: AWSDecodableShape {
        /// The deployment IDs of 'auto-update outdated instances' deployments triggered by this deployment.
        public let autoUpdateOutdatedInstancesDeploymentIds: [String]?
        /// The deployment ID of the root deployment that triggered this deployment.
        public let autoUpdateOutdatedInstancesRootDeploymentId: String?

        @inlinable
        public init(autoUpdateOutdatedInstancesDeploymentIds: [String]? = nil, autoUpdateOutdatedInstancesRootDeploymentId: String? = nil) {
            self.autoUpdateOutdatedInstancesDeploymentIds = autoUpdateOutdatedInstancesDeploymentIds
            self.autoUpdateOutdatedInstancesRootDeploymentId = autoUpdateOutdatedInstancesRootDeploymentId
        }

        private enum CodingKeys: String, CodingKey {
            case autoUpdateOutdatedInstancesDeploymentIds = "autoUpdateOutdatedInstancesDeploymentIds"
            case autoUpdateOutdatedInstancesRootDeploymentId = "autoUpdateOutdatedInstancesRootDeploymentId"
        }
    }

    public struct RemoveTagsFromOnPremisesInstancesInput: AWSEncodableShape {
        /// The names of the on-premises instances from which to remove tags.
        public let instanceNames: [String]
        /// The tag key-value pairs to remove from the on-premises instances.
        public let tags: [Tag]

        @inlinable
        public init(instanceNames: [String], tags: [Tag]) {
            self.instanceNames = instanceNames
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case instanceNames = "instanceNames"
            case tags = "tags"
        }
    }

    public struct RevisionInfo: AWSDecodableShape {
        /// Information about an application revision, including usage details and associated deployment groups.
        public let genericRevisionInfo: GenericRevisionInfo?
        /// Information about the location and type of an application revision.
        public let revisionLocation: RevisionLocation?

        @inlinable
        public init(genericRevisionInfo: GenericRevisionInfo? = nil, revisionLocation: RevisionLocation? = nil) {
            self.genericRevisionInfo = genericRevisionInfo
            self.revisionLocation = revisionLocation
        }

        private enum CodingKeys: String, CodingKey {
            case genericRevisionInfo = "genericRevisionInfo"
            case revisionLocation = "revisionLocation"
        }
    }

    public struct RevisionLocation: AWSEncodableShape & AWSDecodableShape {
        ///  The content of an AppSpec file for an Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
        public let appSpecContent: AppSpecContent?
        /// Information about the location of application artifacts stored in GitHub.
        public let gitHubLocation: GitHubLocation?
        /// The type of application revision:   S3: An application revision stored in Amazon S3.   GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).   String: A YAML-formatted or JSON-formatted string (Lambda deployments only).   AppSpecContent: An AppSpecContent object that contains the contents of an AppSpec file for an Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
        public let revisionType: RevisionLocationType?
        /// Information about the location of a revision stored in Amazon S3.
        public let s3Location: S3Location?
        /// Information about the location of an Lambda deployment revision stored as a RawString.
        public let string: RawString?

        @inlinable
        public init(appSpecContent: AppSpecContent? = nil, gitHubLocation: GitHubLocation? = nil, revisionType: RevisionLocationType? = nil, s3Location: S3Location? = nil, string: RawString? = nil) {
            self.appSpecContent = appSpecContent
            self.gitHubLocation = gitHubLocation
            self.revisionType = revisionType
            self.s3Location = s3Location
            self.string = string
        }

        private enum CodingKeys: String, CodingKey {
            case appSpecContent = "appSpecContent"
            case gitHubLocation = "gitHubLocation"
            case revisionType = "revisionType"
            case s3Location = "s3Location"
            case string = "string"
        }
    }

    public struct RollbackInfo: AWSDecodableShape {
        /// The ID of the deployment rollback.
        public let rollbackDeploymentId: String?
        /// Information that describes the status of a deployment rollback (for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded).
        public let rollbackMessage: String?
        /// The deployment ID of the deployment that was underway and triggered a rollback deployment because it failed or was stopped.
        public let rollbackTriggeringDeploymentId: String?

        @inlinable
        public init(rollbackDeploymentId: String? = nil, rollbackMessage: String? = nil, rollbackTriggeringDeploymentId: String? = nil) {
            self.rollbackDeploymentId = rollbackDeploymentId
            self.rollbackMessage = rollbackMessage
            self.rollbackTriggeringDeploymentId = rollbackTriggeringDeploymentId
        }

        private enum CodingKeys: String, CodingKey {
            case rollbackDeploymentId = "rollbackDeploymentId"
            case rollbackMessage = "rollbackMessage"
            case rollbackTriggeringDeploymentId = "rollbackTriggeringDeploymentId"
        }
    }

    public struct S3Location: AWSEncodableShape & AWSDecodableShape {
        /// The name of the Amazon S3 bucket where the application revision is stored.
        public let bucket: String?
        /// The file type of the application revision. Must be one of the following:    tar: A tar archive file.    tgz: A compressed tar archive file.    zip: A zip archive file.    YAML: A YAML-formatted file.    JSON: A JSON-formatted file.
        public let bundleType: BundleType?
        /// The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision. If the ETag is not specified as an input parameter, ETag validation of the object is skipped.
        public let eTag: String?
        /// The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
        public let key: String?
        /// A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision. If the version is not specified, the system uses the most recent version by default.
        public let version: String?

        @inlinable
        public init(bucket: String? = nil, bundleType: BundleType? = nil, eTag: String? = nil, key: String? = nil, version: String? = nil) {
            self.bucket = bucket
            self.bundleType = bundleType
            self.eTag = eTag
            self.key = key
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "bucket"
            case bundleType = "bundleType"
            case eTag = "eTag"
            case key = "key"
            case version = "version"
        }
    }

    public struct SkipWaitTimeForInstanceTerminationInput: AWSEncodableShape {
        ///  The unique ID of a blue/green deployment for which you want to skip the instance termination wait time.
        public let deploymentId: String?

        @inlinable
        public init(deploymentId: String? = nil) {
            self.deploymentId = deploymentId
        }

        private enum CodingKeys: String, CodingKey {
            case deploymentId = "deploymentId"
        }
    }

    public struct StopDeploymentInput: AWSEncodableShape {
        ///  Indicates, when a deployment is stopped, whether instances that have been updated should be rolled back to the previous version of the application revision.
        public let autoRollbackEnabled: Bool?
        ///  The unique ID of a deployment.
        public let deploymentId: String

        @inlinable
        public init(autoRollbackEnabled: Bool? = nil, deploymentId: String) {
            self.autoRollbackEnabled = autoRollbackEnabled
            self.deploymentId = deploymentId
        }

        private enum CodingKeys: String, CodingKey {
            case autoRollbackEnabled = "autoRollbackEnabled"
            case deploymentId = "deploymentId"
        }
    }

    public struct StopDeploymentOutput: AWSDecodableShape {
        /// The status of the stop deployment operation:   Pending: The stop operation is pending.   Succeeded: The stop operation was successful.
        public let status: StopStatus?
        /// An accompanying status message.
        public let statusMessage: String?

        @inlinable
        public init(status: StopStatus? = nil, statusMessage: String? = nil) {
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
            case statusMessage = "statusMessage"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The tag's key.
        public let key: String?
        /// The tag's value.
        public let value: String?

        @inlinable
        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagFilter: AWSEncodableShape & AWSDecodableShape {
        /// The on-premises instance tag filter key.
        public let key: String?
        /// The on-premises instance tag filter type:   KEY_ONLY: Key only.   VALUE_ONLY: Value only.   KEY_AND_VALUE: Key and value.
        public let type: TagFilterType?
        /// The on-premises instance tag filter value.
        public let value: String?

        @inlinable
        public init(key: String? = nil, type: TagFilterType? = nil, value: String? = nil) {
            self.key = key
            self.type = type
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case type = "Type"
            case value = "Value"
        }
    }

    public struct TagResourceInput: AWSEncodableShape {
        ///  The ARN of a resource, such as a CodeDeploy application or deployment group.
        public let resourceArn: String
        ///  A list of tags that TagResource associates with a resource. The resource is identified by the ResourceArn input parameter.
        public let tags: [Tag]

        @inlinable
        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct TargetGroupInfo: AWSEncodableShape & AWSDecodableShape {
        /// For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment are registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment is complete.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct TargetGroupPairInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
        public let prodTrafficRoute: TrafficRoute?
        ///  One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.
        public let targetGroups: [TargetGroupInfo]?
        ///  An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.
        public let testTrafficRoute: TrafficRoute?

        @inlinable
        public init(prodTrafficRoute: TrafficRoute? = nil, targetGroups: [TargetGroupInfo]? = nil, testTrafficRoute: TrafficRoute? = nil) {
            self.prodTrafficRoute = prodTrafficRoute
            self.targetGroups = targetGroups
            self.testTrafficRoute = testTrafficRoute
        }

        private enum CodingKeys: String, CodingKey {
            case prodTrafficRoute = "prodTrafficRoute"
            case targetGroups = "targetGroups"
            case testTrafficRoute = "testTrafficRoute"
        }
    }

    public struct TargetInstances: AWSEncodableShape & AWSDecodableShape {
        /// The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.
        public let autoScalingGroups: [String]?
        /// Information about the groups of Amazon EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment. Cannot be used in the same call as tagFilters.
        public let ec2TagSet: EC2TagSet?
        /// The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment. Cannot be used in the same call as ec2TagSet.
        public let tagFilters: [EC2TagFilter]?

        @inlinable
        public init(autoScalingGroups: [String]? = nil, ec2TagSet: EC2TagSet? = nil, tagFilters: [EC2TagFilter]? = nil) {
            self.autoScalingGroups = autoScalingGroups
            self.ec2TagSet = ec2TagSet
            self.tagFilters = tagFilters
        }

        private enum CodingKeys: String, CodingKey {
            case autoScalingGroups = "autoScalingGroups"
            case ec2TagSet = "ec2TagSet"
            case tagFilters = "tagFilters"
        }
    }

    public struct TimeBasedCanary: AWSEncodableShape & AWSDecodableShape {
        /// The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.
        public let canaryInterval: Int?
        /// The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.
        public let canaryPercentage: Int?

        @inlinable
        public init(canaryInterval: Int? = nil, canaryPercentage: Int? = nil) {
            self.canaryInterval = canaryInterval
            self.canaryPercentage = canaryPercentage
        }

        private enum CodingKeys: String, CodingKey {
            case canaryInterval = "canaryInterval"
            case canaryPercentage = "canaryPercentage"
        }
    }

    public struct TimeBasedLinear: AWSEncodableShape & AWSDecodableShape {
        /// The number of minutes between each incremental traffic shift of a TimeBasedLinear deployment.
        public let linearInterval: Int?
        /// The percentage of traffic that is shifted at the start of each increment of a TimeBasedLinear deployment.
        public let linearPercentage: Int?

        @inlinable
        public init(linearInterval: Int? = nil, linearPercentage: Int? = nil) {
            self.linearInterval = linearInterval
            self.linearPercentage = linearPercentage
        }

        private enum CodingKeys: String, CodingKey {
            case linearInterval = "linearInterval"
            case linearPercentage = "linearPercentage"
        }
    }

    public struct TimeRange: AWSEncodableShape {
        /// The end time of the time range.  Specify null to leave the end time open-ended.
        public let end: Date?
        /// The start time of the time range.  Specify null to leave the start time open-ended.
        public let start: Date?

        @inlinable
        public init(end: Date? = nil, start: Date? = nil) {
            self.end = end
            self.start = start
        }

        private enum CodingKeys: String, CodingKey {
            case end = "end"
            case start = "start"
        }
    }

    public struct TrafficRoute: AWSEncodableShape & AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.
        public let listenerArns: [String]?

        @inlinable
        public init(listenerArns: [String]? = nil) {
            self.listenerArns = listenerArns
        }

        private enum CodingKeys: String, CodingKey {
            case listenerArns = "listenerArns"
        }
    }

    public struct TrafficRoutingConfig: AWSEncodableShape & AWSDecodableShape {
        /// A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments. The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.
        public let timeBasedCanary: TimeBasedCanary?
        /// A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment's AppSpec file.
        public let timeBasedLinear: TimeBasedLinear?
        /// The type of traffic shifting (TimeBasedCanary or TimeBasedLinear) used by a deployment configuration.
        public let type: TrafficRoutingType?

        @inlinable
        public init(timeBasedCanary: TimeBasedCanary? = nil, timeBasedLinear: TimeBasedLinear? = nil, type: TrafficRoutingType? = nil) {
            self.timeBasedCanary = timeBasedCanary
            self.timeBasedLinear = timeBasedLinear
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case timeBasedCanary = "timeBasedCanary"
            case timeBasedLinear = "timeBasedLinear"
            case type = "type"
        }
    }

    public struct TriggerConfig: AWSEncodableShape & AWSDecodableShape {
        /// The event type or types for which notifications are triggered.
        public let triggerEvents: [TriggerEventType]?
        /// The name of the notification trigger.
        public let triggerName: String?
        /// The Amazon Resource Name (ARN) of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.
        public let triggerTargetArn: String?

        @inlinable
        public init(triggerEvents: [TriggerEventType]? = nil, triggerName: String? = nil, triggerTargetArn: String? = nil) {
            self.triggerEvents = triggerEvents
            self.triggerName = triggerName
            self.triggerTargetArn = triggerTargetArn
        }

        private enum CodingKeys: String, CodingKey {
            case triggerEvents = "triggerEvents"
            case triggerName = "triggerName"
            case triggerTargetArn = "triggerTargetArn"
        }
    }

    public struct UntagResourceInput: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) that specifies from which resource to disassociate the tags with the keys in the TagKeys input parameter.
        public let resourceArn: String
        ///  A list of keys of Tag objects. The Tag objects identified by the keys are disassociated from the resource specified by the ResourceArn input parameter.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateApplicationInput: AWSEncodableShape {
        /// The current name of the application you want to change.
        public let applicationName: String?
        /// The new name to give the application.
        public let newApplicationName: String?

        @inlinable
        public init(applicationName: String? = nil, newApplicationName: String? = nil) {
            self.applicationName = applicationName
            self.newApplicationName = newApplicationName
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.newApplicationName, name: "newApplicationName", parent: name, max: 100)
            try self.validate(self.newApplicationName, name: "newApplicationName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "applicationName"
            case newApplicationName = "newApplicationName"
        }
    }

    public struct UpdateDeploymentGroupInput: AWSEncodableShape {
        /// Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.
        public let alarmConfiguration: AlarmConfiguration?
        /// The application name that corresponds to the deployment group to update.
        public let applicationName: String
        /// Information for an automatic rollback configuration that is added or changed when a deployment group is updated.
        public let autoRollbackConfiguration: AutoRollbackConfiguration?
        /// The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.   To keep the Auto Scaling groups, enter their names or do not specify this parameter.    To remove Auto Scaling groups, specify a non-null empty list of Auto Scaling group names to detach all CodeDeploy-managed Auto Scaling lifecycle hooks. For examples, see Amazon EC2 instances in an Amazon EC2 Auto Scaling group fail to launch and receive the error "Heartbeat Timeout" in the CodeDeploy User Guide.
        public let autoScalingGroups: [String]?
        /// Information about blue/green deployment options for a deployment group.
        public let blueGreenDeploymentConfiguration: BlueGreenDeploymentConfiguration?
        /// The current name of the deployment group.
        public let currentDeploymentGroupName: String
        /// The replacement deployment configuration name to use, if you want to change it.
        public let deploymentConfigName: String?
        /// Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.
        public let deploymentStyle: DeploymentStyle?
        /// The replacement set of Amazon EC2 tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.
        public let ec2TagFilters: [EC2TagFilter]?
        /// Information about groups of tags applied to on-premises instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups.
        public let ec2TagSet: EC2TagSet?
        ///  The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format :.
        public let ecsServices: [ECSService]?
        /// Information about the load balancer used in a deployment.
        public let loadBalancerInfo: LoadBalancerInfo?
        /// The new name of the deployment group, if you want to change it.
        public let newDeploymentGroupName: String?
        /// The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.
        public let onPremisesInstanceTagFilters: [TagFilter]?
        /// Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.
        public let onPremisesTagSet: OnPremisesTagSet?
        /// Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. If this option is set to UPDATE or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances. If this option is set to IGNORE, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.
        public let outdatedInstancesStrategy: OutdatedInstancesStrategy?
        /// A replacement ARN for the service role, if you want to change it.
        public let serviceRoleArn: String?
        /// This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see Integrating CodeDeploy with Amazon EC2 Auto Scaling in the CodeDeploy User Guide. Set terminationHookEnabled to true to have CodeDeploy install a termination hook into your Auto Scaling group when you update a deployment group. When this hook is installed, CodeDeploy will perform termination deployments. For information about termination deployments, see Enabling termination deployments during Auto Scaling scale-in events in the CodeDeploy User Guide. For more information about Auto Scaling scale-in events, see the Scale in topic in the Amazon EC2 Auto Scaling User Guide.
        public let terminationHookEnabled: Bool?
        /// Information about triggers to change when the deployment group is updated. For examples, see Edit a Trigger in a CodeDeploy Deployment Group in the CodeDeploy User Guide.
        public let triggerConfigurations: [TriggerConfig]?

        @inlinable
        public init(alarmConfiguration: AlarmConfiguration? = nil, applicationName: String, autoRollbackConfiguration: AutoRollbackConfiguration? = nil, autoScalingGroups: [String]? = nil, blueGreenDeploymentConfiguration: BlueGreenDeploymentConfiguration? = nil, currentDeploymentGroupName: String, deploymentConfigName: String? = nil, deploymentStyle: DeploymentStyle? = nil, ec2TagFilters: [EC2TagFilter]? = nil, ec2TagSet: EC2TagSet? = nil, ecsServices: [ECSService]? = nil, loadBalancerInfo: LoadBalancerInfo? = nil, newDeploymentGroupName: String? = nil, onPremisesInstanceTagFilters: [TagFilter]? = nil, onPremisesTagSet: OnPremisesTagSet? = nil, outdatedInstancesStrategy: OutdatedInstancesStrategy? = nil, serviceRoleArn: String? = nil, terminationHookEnabled: Bool? = nil, triggerConfigurations: [TriggerConfig]? = nil) {
            self.alarmConfiguration = alarmConfiguration
            self.applicationName = applicationName
            self.autoRollbackConfiguration = autoRollbackConfiguration
            self.autoScalingGroups = autoScalingGroups
            self.blueGreenDeploymentConfiguration = blueGreenDeploymentConfiguration
            self.currentDeploymentGroupName = currentDeploymentGroupName
            self.deploymentConfigName = deploymentConfigName
            self.deploymentStyle = deploymentStyle
            self.ec2TagFilters = ec2TagFilters
            self.ec2TagSet = ec2TagSet
            self.ecsServices = ecsServices
            self.loadBalancerInfo = loadBalancerInfo
            self.newDeploymentGroupName = newDeploymentGroupName
            self.onPremisesInstanceTagFilters = onPremisesInstanceTagFilters
            self.onPremisesTagSet = onPremisesTagSet
            self.outdatedInstancesStrategy = outdatedInstancesStrategy
            self.serviceRoleArn = serviceRoleArn
            self.terminationHookEnabled = terminationHookEnabled
            self.triggerConfigurations = triggerConfigurations
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 100)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.currentDeploymentGroupName, name: "currentDeploymentGroupName", parent: name, max: 100)
            try self.validate(self.currentDeploymentGroupName, name: "currentDeploymentGroupName", parent: name, min: 1)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, max: 100)
            try self.validate(self.deploymentConfigName, name: "deploymentConfigName", parent: name, min: 1)
            try self.validate(self.newDeploymentGroupName, name: "newDeploymentGroupName", parent: name, max: 100)
            try self.validate(self.newDeploymentGroupName, name: "newDeploymentGroupName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case alarmConfiguration = "alarmConfiguration"
            case applicationName = "applicationName"
            case autoRollbackConfiguration = "autoRollbackConfiguration"
            case autoScalingGroups = "autoScalingGroups"
            case blueGreenDeploymentConfiguration = "blueGreenDeploymentConfiguration"
            case currentDeploymentGroupName = "currentDeploymentGroupName"
            case deploymentConfigName = "deploymentConfigName"
            case deploymentStyle = "deploymentStyle"
            case ec2TagFilters = "ec2TagFilters"
            case ec2TagSet = "ec2TagSet"
            case ecsServices = "ecsServices"
            case loadBalancerInfo = "loadBalancerInfo"
            case newDeploymentGroupName = "newDeploymentGroupName"
            case onPremisesInstanceTagFilters = "onPremisesInstanceTagFilters"
            case onPremisesTagSet = "onPremisesTagSet"
            case outdatedInstancesStrategy = "outdatedInstancesStrategy"
            case serviceRoleArn = "serviceRoleArn"
            case terminationHookEnabled = "terminationHookEnabled"
            case triggerConfigurations = "triggerConfigurations"
        }
    }

    public struct UpdateDeploymentGroupOutput: AWSDecodableShape {
        /// If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the Amazon Web Services account. If the output contains data, CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the Amazon Web Services account.
        public let hooksNotCleanedUp: [AutoScalingGroup]?

        @inlinable
        public init(hooksNotCleanedUp: [AutoScalingGroup]? = nil) {
            self.hooksNotCleanedUp = hooksNotCleanedUp
        }

        private enum CodingKeys: String, CodingKey {
            case hooksNotCleanedUp = "hooksNotCleanedUp"
        }
    }

    public struct ZonalConfig: AWSEncodableShape & AWSDecodableShape {
        /// The period of time, in seconds, that CodeDeploy must wait after completing a deployment to the first Availability Zone. CodeDeploy will wait this amount of time before starting a deployment to the second Availability Zone. You might set this option if you want to allow extra bake time for the first Availability Zone. If you don't specify a value for firstZoneMonitorDurationInSeconds, then CodeDeploy uses the monitorDurationInSeconds value for the first Availability Zone. For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.
        public let firstZoneMonitorDurationInSeconds: Int64?
        /// The number or percentage of instances that must remain available per Availability Zone during a deployment. This option works in conjunction with the MinimumHealthyHosts option. For more information, see About the minimum number of healthy hosts per Availability Zone in the CodeDeploy User Guide. If you don't specify the minimumHealthyHostsPerZone option, then CodeDeploy uses a default value of 0 percent. For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.
        public let minimumHealthyHostsPerZone: MinimumHealthyHostsPerZone?
        /// The period of time, in seconds, that CodeDeploy must wait after completing a deployment to an Availability Zone. CodeDeploy will wait this amount of time before starting a deployment to the next Availability Zone. Consider adding a monitor duration to give the deployment some time to prove itself (or 'bake') in one Availability Zone before it is released in the next zone. If you don't specify a monitorDurationInSeconds, CodeDeploy starts deploying to the next Availability Zone immediately. For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.
        public let monitorDurationInSeconds: Int64?

        @inlinable
        public init(firstZoneMonitorDurationInSeconds: Int64? = nil, minimumHealthyHostsPerZone: MinimumHealthyHostsPerZone? = nil, monitorDurationInSeconds: Int64? = nil) {
            self.firstZoneMonitorDurationInSeconds = firstZoneMonitorDurationInSeconds
            self.minimumHealthyHostsPerZone = minimumHealthyHostsPerZone
            self.monitorDurationInSeconds = monitorDurationInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case firstZoneMonitorDurationInSeconds = "firstZoneMonitorDurationInSeconds"
            case minimumHealthyHostsPerZone = "minimumHealthyHostsPerZone"
            case monitorDurationInSeconds = "monitorDurationInSeconds"
        }
    }
}

// MARK: - Errors

/// Error enum for CodeDeploy
public struct CodeDeployErrorType: AWSErrorType {
    enum Code: String {
        case alarmsLimitExceededException = "AlarmsLimitExceededException"
        case applicationAlreadyExistsException = "ApplicationAlreadyExistsException"
        case applicationDoesNotExistException = "ApplicationDoesNotExistException"
        case applicationLimitExceededException = "ApplicationLimitExceededException"
        case applicationNameRequiredException = "ApplicationNameRequiredException"
        case arnNotSupportedException = "ArnNotSupportedException"
        case batchLimitExceededException = "BatchLimitExceededException"
        case bucketNameFilterRequiredException = "BucketNameFilterRequiredException"
        case deploymentAlreadyCompletedException = "DeploymentAlreadyCompletedException"
        case deploymentConfigAlreadyExistsException = "DeploymentConfigAlreadyExistsException"
        case deploymentConfigDoesNotExistException = "DeploymentConfigDoesNotExistException"
        case deploymentConfigInUseException = "DeploymentConfigInUseException"
        case deploymentConfigLimitExceededException = "DeploymentConfigLimitExceededException"
        case deploymentConfigNameRequiredException = "DeploymentConfigNameRequiredException"
        case deploymentDoesNotExistException = "DeploymentDoesNotExistException"
        case deploymentGroupAlreadyExistsException = "DeploymentGroupAlreadyExistsException"
        case deploymentGroupDoesNotExistException = "DeploymentGroupDoesNotExistException"
        case deploymentGroupLimitExceededException = "DeploymentGroupLimitExceededException"
        case deploymentGroupNameRequiredException = "DeploymentGroupNameRequiredException"
        case deploymentIdRequiredException = "DeploymentIdRequiredException"
        case deploymentIsNotInReadyStateException = "DeploymentIsNotInReadyStateException"
        case deploymentLimitExceededException = "DeploymentLimitExceededException"
        case deploymentNotStartedException = "DeploymentNotStartedException"
        case deploymentTargetDoesNotExistException = "DeploymentTargetDoesNotExistException"
        case deploymentTargetIdRequiredException = "DeploymentTargetIdRequiredException"
        case deploymentTargetListSizeExceededException = "DeploymentTargetListSizeExceededException"
        case descriptionTooLongException = "DescriptionTooLongException"
        case ecsServiceMappingLimitExceededException = "ECSServiceMappingLimitExceededException"
        case gitHubAccountTokenDoesNotExistException = "GitHubAccountTokenDoesNotExistException"
        case gitHubAccountTokenNameRequiredException = "GitHubAccountTokenNameRequiredException"
        case iamArnRequiredException = "IamArnRequiredException"
        case iamSessionArnAlreadyRegisteredException = "IamSessionArnAlreadyRegisteredException"
        case iamUserArnAlreadyRegisteredException = "IamUserArnAlreadyRegisteredException"
        case iamUserArnRequiredException = "IamUserArnRequiredException"
        case instanceDoesNotExistException = "InstanceDoesNotExistException"
        case instanceIdRequiredException = "InstanceIdRequiredException"
        case instanceLimitExceededException = "InstanceLimitExceededException"
        case instanceNameAlreadyRegisteredException = "InstanceNameAlreadyRegisteredException"
        case instanceNameRequiredException = "InstanceNameRequiredException"
        case instanceNotRegisteredException = "InstanceNotRegisteredException"
        case invalidAlarmConfigException = "InvalidAlarmConfigException"
        case invalidApplicationNameException = "InvalidApplicationNameException"
        case invalidArnException = "InvalidArnException"
        case invalidAutoRollbackConfigException = "InvalidAutoRollbackConfigException"
        case invalidAutoScalingGroupException = "InvalidAutoScalingGroupException"
        case invalidBlueGreenDeploymentConfigurationException = "InvalidBlueGreenDeploymentConfigurationException"
        case invalidBucketNameFilterException = "InvalidBucketNameFilterException"
        case invalidComputePlatformException = "InvalidComputePlatformException"
        case invalidDeployedStateFilterException = "InvalidDeployedStateFilterException"
        case invalidDeploymentConfigNameException = "InvalidDeploymentConfigNameException"
        case invalidDeploymentGroupNameException = "InvalidDeploymentGroupNameException"
        case invalidDeploymentIdException = "InvalidDeploymentIdException"
        case invalidDeploymentInstanceTypeException = "InvalidDeploymentInstanceTypeException"
        case invalidDeploymentStatusException = "InvalidDeploymentStatusException"
        case invalidDeploymentStyleException = "InvalidDeploymentStyleException"
        case invalidDeploymentTargetIdException = "InvalidDeploymentTargetIdException"
        case invalidDeploymentWaitTypeException = "InvalidDeploymentWaitTypeException"
        case invalidEC2TagCombinationException = "InvalidEC2TagCombinationException"
        case invalidEC2TagException = "InvalidEC2TagException"
        case invalidECSServiceException = "InvalidECSServiceException"
        case invalidExternalIdException = "InvalidExternalIdException"
        case invalidFileExistsBehaviorException = "InvalidFileExistsBehaviorException"
        case invalidGitHubAccountTokenException = "InvalidGitHubAccountTokenException"
        case invalidGitHubAccountTokenNameException = "InvalidGitHubAccountTokenNameException"
        case invalidIamSessionArnException = "InvalidIamSessionArnException"
        case invalidIamUserArnException = "InvalidIamUserArnException"
        case invalidIgnoreApplicationStopFailuresValueException = "InvalidIgnoreApplicationStopFailuresValueException"
        case invalidInputException = "InvalidInputException"
        case invalidInstanceNameException = "InvalidInstanceNameException"
        case invalidInstanceStatusException = "InvalidInstanceStatusException"
        case invalidInstanceTypeException = "InvalidInstanceTypeException"
        case invalidKeyPrefixFilterException = "InvalidKeyPrefixFilterException"
        case invalidLifecycleEventHookExecutionIdException = "InvalidLifecycleEventHookExecutionIdException"
        case invalidLifecycleEventHookExecutionStatusException = "InvalidLifecycleEventHookExecutionStatusException"
        case invalidLoadBalancerInfoException = "InvalidLoadBalancerInfoException"
        case invalidMinimumHealthyHostValueException = "InvalidMinimumHealthyHostValueException"
        case invalidNextTokenException = "InvalidNextTokenException"
        case invalidOnPremisesTagCombinationException = "InvalidOnPremisesTagCombinationException"
        case invalidOperationException = "InvalidOperationException"
        case invalidRegistrationStatusException = "InvalidRegistrationStatusException"
        case invalidRevisionException = "InvalidRevisionException"
        case invalidRoleException = "InvalidRoleException"
        case invalidSortByException = "InvalidSortByException"
        case invalidSortOrderException = "InvalidSortOrderException"
        case invalidTagException = "InvalidTagException"
        case invalidTagFilterException = "InvalidTagFilterException"
        case invalidTagsToAddException = "InvalidTagsToAddException"
        case invalidTargetFilterNameException = "InvalidTargetFilterNameException"
        case invalidTargetGroupPairException = "InvalidTargetGroupPairException"
        case invalidTargetInstancesException = "InvalidTargetInstancesException"
        case invalidTimeRangeException = "InvalidTimeRangeException"
        case invalidTrafficRoutingConfigurationException = "InvalidTrafficRoutingConfigurationException"
        case invalidTriggerConfigException = "InvalidTriggerConfigException"
        case invalidUpdateOutdatedInstancesOnlyValueException = "InvalidUpdateOutdatedInstancesOnlyValueException"
        case invalidZonalDeploymentConfigurationException = "InvalidZonalDeploymentConfigurationException"
        case lifecycleEventAlreadyCompletedException = "LifecycleEventAlreadyCompletedException"
        case lifecycleHookLimitExceededException = "LifecycleHookLimitExceededException"
        case multipleIamArnsProvidedException = "MultipleIamArnsProvidedException"
        case operationNotSupportedException = "OperationNotSupportedException"
        case resourceArnRequiredException = "ResourceArnRequiredException"
        case resourceValidationException = "ResourceValidationException"
        case revisionDoesNotExistException = "RevisionDoesNotExistException"
        case revisionRequiredException = "RevisionRequiredException"
        case roleRequiredException = "RoleRequiredException"
        case tagLimitExceededException = "TagLimitExceededException"
        case tagRequiredException = "TagRequiredException"
        case tagSetListLimitExceededException = "TagSetListLimitExceededException"
        case throttlingException = "ThrottlingException"
        case triggerTargetsLimitExceededException = "TriggerTargetsLimitExceededException"
        case unsupportedActionForDeploymentTypeException = "UnsupportedActionForDeploymentTypeException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize CodeDeploy
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The maximum number of alarms for a deployment group (10) was exceeded.
    public static var alarmsLimitExceededException: Self { .init(.alarmsLimitExceededException) }
    /// An application with the specified name with the user or Amazon Web Services account already exists.
    public static var applicationAlreadyExistsException: Self { .init(.applicationAlreadyExistsException) }
    /// The application does not exist with the user or Amazon Web Services account.
    public static var applicationDoesNotExistException: Self { .init(.applicationDoesNotExistException) }
    /// More applications were attempted to be created than are allowed.
    public static var applicationLimitExceededException: Self { .init(.applicationLimitExceededException) }
    /// The minimum number of required application names was not specified.
    public static var applicationNameRequiredException: Self { .init(.applicationNameRequiredException) }
    ///  The specified ARN is not supported. For example, it might be an ARN for a resource that is not expected.
    public static var arnNotSupportedException: Self { .init(.arnNotSupportedException) }
    /// The maximum number of names or IDs allowed for this request (100) was exceeded.
    public static var batchLimitExceededException: Self { .init(.batchLimitExceededException) }
    /// A bucket name is required, but was not provided.
    public static var bucketNameFilterRequiredException: Self { .init(.bucketNameFilterRequiredException) }
    /// The deployment is already complete.
    public static var deploymentAlreadyCompletedException: Self { .init(.deploymentAlreadyCompletedException) }
    /// A deployment configuration with the specified name with the user or Amazon Web Services account already exists.
    public static var deploymentConfigAlreadyExistsException: Self { .init(.deploymentConfigAlreadyExistsException) }
    /// The deployment configuration does not exist with the user or Amazon Web Services account.
    public static var deploymentConfigDoesNotExistException: Self { .init(.deploymentConfigDoesNotExistException) }
    /// The deployment configuration is still in use.
    public static var deploymentConfigInUseException: Self { .init(.deploymentConfigInUseException) }
    /// The deployment configurations limit was exceeded.
    public static var deploymentConfigLimitExceededException: Self { .init(.deploymentConfigLimitExceededException) }
    /// The deployment configuration name was not specified.
    public static var deploymentConfigNameRequiredException: Self { .init(.deploymentConfigNameRequiredException) }
    /// The deployment with the user or Amazon Web Services account does not exist.
    public static var deploymentDoesNotExistException: Self { .init(.deploymentDoesNotExistException) }
    /// A deployment group with the specified name with the user or Amazon Web Services account already exists.
    public static var deploymentGroupAlreadyExistsException: Self { .init(.deploymentGroupAlreadyExistsException) }
    /// The named deployment group with the user or Amazon Web Services account does not exist.
    public static var deploymentGroupDoesNotExistException: Self { .init(.deploymentGroupDoesNotExistException) }
    ///  The deployment groups limit was exceeded.
    public static var deploymentGroupLimitExceededException: Self { .init(.deploymentGroupLimitExceededException) }
    /// The deployment group name was not specified.
    public static var deploymentGroupNameRequiredException: Self { .init(.deploymentGroupNameRequiredException) }
    /// At least one deployment ID must be specified.
    public static var deploymentIdRequiredException: Self { .init(.deploymentIdRequiredException) }
    /// The deployment does not have a status of Ready and can't continue yet.
    public static var deploymentIsNotInReadyStateException: Self { .init(.deploymentIsNotInReadyStateException) }
    /// The number of allowed deployments was exceeded.
    public static var deploymentLimitExceededException: Self { .init(.deploymentLimitExceededException) }
    /// The specified deployment has not started.
    public static var deploymentNotStartedException: Self { .init(.deploymentNotStartedException) }
    ///  The provided target ID does not belong to the attempted deployment.
    public static var deploymentTargetDoesNotExistException: Self { .init(.deploymentTargetDoesNotExistException) }
    ///  A deployment target ID was not provided.
    public static var deploymentTargetIdRequiredException: Self { .init(.deploymentTargetIdRequiredException) }
    ///  The maximum number of targets that can be associated with an Amazon ECS or Lambda deployment was exceeded. The target list of both types of deployments must have exactly one item. This exception does not apply to EC2/On-premises deployments.
    public static var deploymentTargetListSizeExceededException: Self { .init(.deploymentTargetListSizeExceededException) }
    /// The description is too long.
    public static var descriptionTooLongException: Self { .init(.descriptionTooLongException) }
    ///  The Amazon ECS service is associated with more than one deployment groups. An Amazon ECS service can be associated with only one deployment group.
    public static var ecsServiceMappingLimitExceededException: Self { .init(.ecsServiceMappingLimitExceededException) }
    /// No GitHub account connection exists with the named specified in the call.
    public static var gitHubAccountTokenDoesNotExistException: Self { .init(.gitHubAccountTokenDoesNotExistException) }
    /// The call is missing a required GitHub account connection name.
    public static var gitHubAccountTokenNameRequiredException: Self { .init(.gitHubAccountTokenNameRequiredException) }
    /// No IAM ARN was included in the request. You must use an IAM session ARN or user ARN in the request.
    public static var iamArnRequiredException: Self { .init(.iamArnRequiredException) }
    /// The request included an IAM session ARN that has already been used to register a different instance.
    public static var iamSessionArnAlreadyRegisteredException: Self { .init(.iamSessionArnAlreadyRegisteredException) }
    /// The specified user ARN is already registered with an on-premises instance.
    public static var iamUserArnAlreadyRegisteredException: Self { .init(.iamUserArnAlreadyRegisteredException) }
    /// An user ARN was not specified.
    public static var iamUserArnRequiredException: Self { .init(.iamUserArnRequiredException) }
    /// The specified instance does not exist in the deployment group.
    public static var instanceDoesNotExistException: Self { .init(.instanceDoesNotExistException) }
    /// The instance ID was not specified.
    public static var instanceIdRequiredException: Self { .init(.instanceIdRequiredException) }
    /// The maximum number of allowed on-premises instances in a single call was exceeded.
    public static var instanceLimitExceededException: Self { .init(.instanceLimitExceededException) }
    /// The specified on-premises instance name is already registered.
    public static var instanceNameAlreadyRegisteredException: Self { .init(.instanceNameAlreadyRegisteredException) }
    /// An on-premises instance name was not specified.
    public static var instanceNameRequiredException: Self { .init(.instanceNameRequiredException) }
    /// The specified on-premises instance is not registered.
    public static var instanceNotRegisteredException: Self { .init(.instanceNotRegisteredException) }
    /// The format of the alarm configuration is invalid. Possible causes include:   The alarm list is null.   The alarm object is null.   The alarm name is empty or null or exceeds the limit of 255 characters.   Two alarms with the same name have been specified.   The alarm configuration is enabled, but the alarm list is empty.
    public static var invalidAlarmConfigException: Self { .init(.invalidAlarmConfigException) }
    /// The application name was specified in an invalid format.
    public static var invalidApplicationNameException: Self { .init(.invalidApplicationNameException) }
    ///  The specified ARN is not in a valid format.
    public static var invalidArnException: Self { .init(.invalidArnException) }
    /// The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.
    public static var invalidAutoRollbackConfigException: Self { .init(.invalidAutoRollbackConfigException) }
    /// The Auto Scaling group was specified in an invalid format or does not exist.
    public static var invalidAutoScalingGroupException: Self { .init(.invalidAutoScalingGroupException) }
    /// The configuration for the blue/green deployment group was provided in an invalid format. For information about deployment configuration format, see CreateDeploymentConfig.
    public static var invalidBlueGreenDeploymentConfigurationException: Self { .init(.invalidBlueGreenDeploymentConfigurationException) }
    /// The bucket name either doesn't exist or was specified in an invalid format.
    public static var invalidBucketNameFilterException: Self { .init(.invalidBucketNameFilterException) }
    /// The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.
    public static var invalidComputePlatformException: Self { .init(.invalidComputePlatformException) }
    /// The deployed state filter was specified in an invalid format.
    public static var invalidDeployedStateFilterException: Self { .init(.invalidDeployedStateFilterException) }
    /// The deployment configuration name was specified in an invalid format.
    public static var invalidDeploymentConfigNameException: Self { .init(.invalidDeploymentConfigNameException) }
    /// The deployment group name was specified in an invalid format.
    public static var invalidDeploymentGroupNameException: Self { .init(.invalidDeploymentGroupNameException) }
    /// At least one of the deployment IDs was specified in an invalid format.
    public static var invalidDeploymentIdException: Self { .init(.invalidDeploymentIdException) }
    /// An instance type was specified for an in-place deployment. Instance types are supported for blue/green deployments only.
    public static var invalidDeploymentInstanceTypeException: Self { .init(.invalidDeploymentInstanceTypeException) }
    /// The specified deployment status doesn't exist or cannot be determined.
    public static var invalidDeploymentStatusException: Self { .init(.invalidDeploymentStatusException) }
    /// An invalid deployment style was specified. Valid deployment types include "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" and "WITHOUT_TRAFFIC_CONTROL."
    public static var invalidDeploymentStyleException: Self { .init(.invalidDeploymentStyleException) }
    ///  The target ID provided was not valid.
    public static var invalidDeploymentTargetIdException: Self { .init(.invalidDeploymentTargetIdException) }
    ///  The wait type is invalid.
    public static var invalidDeploymentWaitTypeException: Self { .init(.invalidDeploymentWaitTypeException) }
    /// A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but only one of these data types can be used in a single call.
    public static var invalidEC2TagCombinationException: Self { .init(.invalidEC2TagCombinationException) }
    /// The tag was specified in an invalid format.
    public static var invalidEC2TagException: Self { .init(.invalidEC2TagException) }
    ///  The Amazon ECS service identifier is not valid.
    public static var invalidECSServiceException: Self { .init(.invalidECSServiceException) }
    /// The external ID was specified in an invalid format.
    public static var invalidExternalIdException: Self { .init(.invalidExternalIdException) }
    /// An invalid fileExistsBehavior option was specified to determine how CodeDeploy handles files or directories that already exist in a deployment target location, but weren't part of the previous successful deployment. Valid values include "DISALLOW," "OVERWRITE," and "RETAIN."
    public static var invalidFileExistsBehaviorException: Self { .init(.invalidFileExistsBehaviorException) }
    /// The GitHub token is not valid.
    public static var invalidGitHubAccountTokenException: Self { .init(.invalidGitHubAccountTokenException) }
    /// The format of the specified GitHub account connection name is invalid.
    public static var invalidGitHubAccountTokenNameException: Self { .init(.invalidGitHubAccountTokenNameException) }
    /// The IAM session ARN was specified in an invalid format.
    public static var invalidIamSessionArnException: Self { .init(.invalidIamSessionArnException) }
    /// The user ARN was specified in an invalid format.
    public static var invalidIamUserArnException: Self { .init(.invalidIamUserArnException) }
    /// The IgnoreApplicationStopFailures value is invalid. For Lambda deployments, false is expected. For EC2/On-premises deployments, true or false is expected.
    public static var invalidIgnoreApplicationStopFailuresValueException: Self { .init(.invalidIgnoreApplicationStopFailuresValueException) }
    /// The input was specified in an invalid format.
    public static var invalidInputException: Self { .init(.invalidInputException) }
    /// The on-premises instance name was specified in an invalid format.
    public static var invalidInstanceNameException: Self { .init(.invalidInstanceNameException) }
    /// The specified instance status does not exist.
    public static var invalidInstanceStatusException: Self { .init(.invalidInstanceStatusException) }
    /// An invalid instance type was specified for instances in a blue/green deployment. Valid values include "Blue" for an original environment and "Green" for a replacement environment.
    public static var invalidInstanceTypeException: Self { .init(.invalidInstanceTypeException) }
    /// The specified key prefix filter was specified in an invalid format.
    public static var invalidKeyPrefixFilterException: Self { .init(.invalidKeyPrefixFilterException) }
    /// A lifecycle event hook is invalid. Review the hooks section in your AppSpec file to ensure the lifecycle events and hooks functions are valid.
    public static var invalidLifecycleEventHookExecutionIdException: Self { .init(.invalidLifecycleEventHookExecutionIdException) }
    /// The result of a Lambda validation function that verifies a lifecycle event is invalid. It should return Succeeded or Failed.
    public static var invalidLifecycleEventHookExecutionStatusException: Self { .init(.invalidLifecycleEventHookExecutionStatusException) }
    /// An invalid load balancer name, or no load balancer name, was specified.
    public static var invalidLoadBalancerInfoException: Self { .init(.invalidLoadBalancerInfoException) }
    /// The minimum healthy instance value was specified in an invalid format.
    public static var invalidMinimumHealthyHostValueException: Self { .init(.invalidMinimumHealthyHostValueException) }
    /// The next token was specified in an invalid format.
    public static var invalidNextTokenException: Self { .init(.invalidNextTokenException) }
    /// A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, but only one of these data types can be used in a single call.
    public static var invalidOnPremisesTagCombinationException: Self { .init(.invalidOnPremisesTagCombinationException) }
    /// An invalid operation was detected.
    public static var invalidOperationException: Self { .init(.invalidOperationException) }
    /// The registration status was specified in an invalid format.
    public static var invalidRegistrationStatusException: Self { .init(.invalidRegistrationStatusException) }
    /// The revision was specified in an invalid format.
    public static var invalidRevisionException: Self { .init(.invalidRevisionException) }
    /// The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.
    public static var invalidRoleException: Self { .init(.invalidRoleException) }
    /// The column name to sort by is either not present or was specified in an invalid format.
    public static var invalidSortByException: Self { .init(.invalidSortByException) }
    /// The sort order was specified in an invalid format.
    public static var invalidSortOrderException: Self { .init(.invalidSortOrderException) }
    /// The tag was specified in an invalid format.
    public static var invalidTagException: Self { .init(.invalidTagException) }
    /// The tag filter was specified in an invalid format.
    public static var invalidTagFilterException: Self { .init(.invalidTagFilterException) }
    ///  The specified tags are not valid.
    public static var invalidTagsToAddException: Self { .init(.invalidTagsToAddException) }
    ///  The target filter name is invalid.
    public static var invalidTargetFilterNameException: Self { .init(.invalidTargetFilterNameException) }
    ///  A target group pair associated with this deployment is not valid.
    public static var invalidTargetGroupPairException: Self { .init(.invalidTargetGroupPairException) }
    /// The target instance configuration is invalid. Possible causes include:   Configuration data for target instances was entered for an in-place deployment.   The limit of 10 tags for a tag type was exceeded.   The combined length of the tag names exceeded the limit.    A specified tag is not currently applied to any instances.
    public static var invalidTargetInstancesException: Self { .init(.invalidTargetInstancesException) }
    /// The specified time range was specified in an invalid format.
    public static var invalidTimeRangeException: Self { .init(.invalidTimeRangeException) }
    ///  The configuration that specifies how traffic is routed during a deployment is invalid.
    public static var invalidTrafficRoutingConfigurationException: Self { .init(.invalidTrafficRoutingConfigurationException) }
    /// The trigger was specified in an invalid format.
    public static var invalidTriggerConfigException: Self { .init(.invalidTriggerConfigException) }
    /// The UpdateOutdatedInstancesOnly value is invalid. For Lambda deployments, false is expected. For EC2/On-premises deployments, true or false is expected.
    public static var invalidUpdateOutdatedInstancesOnlyValueException: Self { .init(.invalidUpdateOutdatedInstancesOnlyValueException) }
    /// The ZonalConfig object is not valid.
    public static var invalidZonalDeploymentConfigurationException: Self { .init(.invalidZonalDeploymentConfigurationException) }
    /// An attempt to return the status of an already completed lifecycle event occurred.
    public static var lifecycleEventAlreadyCompletedException: Self { .init(.lifecycleEventAlreadyCompletedException) }
    /// The limit for lifecycle hooks was exceeded.
    public static var lifecycleHookLimitExceededException: Self { .init(.lifecycleHookLimitExceededException) }
    /// Both an user ARN and an IAM session ARN were included in the request. Use only one ARN type.
    public static var multipleIamArnsProvidedException: Self { .init(.multipleIamArnsProvidedException) }
    /// The API used does not support the deployment.
    public static var operationNotSupportedException: Self { .init(.operationNotSupportedException) }
    ///  The ARN of a resource is required, but was not found.
    public static var resourceArnRequiredException: Self { .init(.resourceArnRequiredException) }
    /// The specified resource could not be validated.
    public static var resourceValidationException: Self { .init(.resourceValidationException) }
    /// The named revision does not exist with the user or Amazon Web Services account.
    public static var revisionDoesNotExistException: Self { .init(.revisionDoesNotExistException) }
    /// The revision ID was not specified.
    public static var revisionRequiredException: Self { .init(.revisionRequiredException) }
    /// The role ID was not specified.
    public static var roleRequiredException: Self { .init(.roleRequiredException) }
    /// The maximum allowed number of tags was exceeded.
    public static var tagLimitExceededException: Self { .init(.tagLimitExceededException) }
    /// A tag was not specified.
    public static var tagRequiredException: Self { .init(.tagRequiredException) }
    /// The number of tag groups included in the tag set list exceeded the maximum allowed limit of 3.
    public static var tagSetListLimitExceededException: Self { .init(.tagSetListLimitExceededException) }
    /// An API function was called too frequently.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// The maximum allowed number of triggers was exceeded.
    public static var triggerTargetsLimitExceededException: Self { .init(.triggerTargetsLimitExceededException) }
    /// A call was submitted that is not supported for the specified deployment type.
    public static var unsupportedActionForDeploymentTypeException: Self { .init(.unsupportedActionForDeploymentTypeException) }
}

extension CodeDeployErrorType: Equatable {
    public static func == (lhs: CodeDeployErrorType, rhs: CodeDeployErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension CodeDeployErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
